Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to install Rails admin in Rails application

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 532
    Comment on it

    How to install Rails admin in Rails application

    As we know that almost all web applications have an admin panel through which the administrator of the application 

    can manage all the data of the application and make necessary changes in them according to the confidentiality of 

    data and the need to which the data has to be created, updated or deleted.

    For these purposes we have a very useful gem called Rails Admin which helps us for these purposes.

    Some features of Rails Admin are : 

    • We can CRUD all the data easily
    • It provides us with custom actions
    • It gives automatic form validations
    • We can export the data to CSV,JSON or XML File
    • We can authenticate it through Devise gem
    • It supports Admin and Sub admin authorization through can can gem

    Now to install this we first need to intsall the gem in the Gemfile

    gem 'rails_admin'

    And then run bundle install on console.

    After this we need to run the rails generator to install active admin on it like this in our console

    $ rails g rails_admin:install

    As soon as we run the generator it will ask us to provide a namespace or we can say URL on which we want to 

    access our admin panel. If you feel comfortable with the default namespace which is /admin then just press enter.

    After that restart your rails server and you are good to go.

    Hit the URL localhost:3000/admin and here comes your Rails admin fully installed with all the models along with

    their crud.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: