简体   繁体   中英

how to generate active admin views in rails

I am using active admin in my project.

I want to override some view section.

How can i generate the active admin view in my project repository

Active Admin doesnt work like devise or other gems where you can generate the views.

Inside your app you would have admin folder if you have active admin generated for any of the models.

It uses inherited resources so you can edit the new, index, edit,etc. Also if you create any custom pages.

So for editing any of the the inherited resource, say example index page of User table:

index do
    column :name

    column 'Profile pic' do |p|
      image_tag p.logo.url
    end

    column 'Members' do |p|
      p.is_member?
    end

    default_actions
  end

Let me know if you need more help.

http://activeadmin.info/documentation.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM