activeadmin_addons 0.12.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/assets/javascripts/activeadmin_addons/all.js.coffee +11 -4
- data/app/assets/javascripts/activeadmin_addons/config.js +3 -3
- data/app/assets/javascripts/activeadmin_addons/{color-picker.js → inputs/color-picker.js} +2 -6
- data/app/assets/javascripts/activeadmin_addons/{date-time-picker.js → inputs/date-time-picker.js} +6 -7
- data/app/assets/javascripts/activeadmin_addons/inputs/nested-select.js +160 -0
- data/app/assets/javascripts/activeadmin_addons/inputs/search-select.js +71 -0
- data/app/assets/javascripts/activeadmin_addons/inputs/select2.js +49 -0
- data/app/assets/javascripts/activeadmin_addons/{selected-list.js → inputs/selected-list.js} +34 -42
- data/app/assets/javascripts/activeadmin_addons/inputs/tags.js +73 -0
- data/app/assets/stylesheets/activeadmin_addons/all.scss +12 -31
- data/app/assets/stylesheets/activeadmin_addons/inputs/color-picker.scss +4 -0
- data/app/assets/stylesheets/activeadmin_addons/inputs/date-time-picker.scss +5 -0
- data/app/assets/stylesheets/activeadmin_addons/inputs/numeric-range-filter.scss +12 -0
- data/app/assets/stylesheets/activeadmin_addons/inputs/select2.scss +3 -0
- data/app/assets/stylesheets/{selected-list.scss → activeadmin_addons/inputs/selected-list.scss} +1 -5
- data/app/inputs/ajax_filter_input.rb +3 -49
- data/app/inputs/color_picker_input.rb +7 -15
- data/app/inputs/date_time_picker_input.rb +12 -25
- data/app/inputs/nested_level_input.rb +49 -0
- data/app/inputs/nested_select_input.rb +35 -94
- data/app/inputs/numeric_range_filter_input.rb +27 -0
- data/app/inputs/range_select_input.rb +3 -32
- data/app/inputs/search_select_filter_input.rb +12 -0
- data/app/inputs/search_select_input.rb +26 -14
- data/app/inputs/selected_list_input.rb +36 -77
- data/app/inputs/tags_input.rb +36 -68
- data/lib/activeadmin_addons.rb +11 -1
- data/lib/activeadmin_addons/addons/{paperclip_attachment.rb → attachment_builder.rb} +13 -26
- data/lib/activeadmin_addons/addons/bool_builder.rb +31 -0
- data/lib/activeadmin_addons/addons/image_builder.rb +12 -0
- data/lib/activeadmin_addons/addons/list_builder.rb +73 -0
- data/lib/activeadmin_addons/addons/{number.rb → number_builder.rb} +4 -15
- data/lib/activeadmin_addons/addons/{state_values.rb → state_builder.rb} +4 -17
- data/lib/activeadmin_addons/addons/tag_builder.rb +31 -0
- data/lib/activeadmin_addons/engine.rb +6 -13
- data/lib/activeadmin_addons/support/custom_builder.rb +22 -2
- data/lib/activeadmin_addons/support/input_base.rb +46 -0
- data/lib/activeadmin_addons/support/input_helpers/filter_input.rb +6 -0
- data/lib/activeadmin_addons/support/input_helpers/filter_input_methods.rb +30 -0
- data/lib/activeadmin_addons/support/input_helpers/input_html_helpers.rb +43 -0
- data/lib/activeadmin_addons/support/input_helpers/input_methods.rb +68 -0
- data/lib/activeadmin_addons/support/input_helpers/input_options_handler.rb +86 -0
- data/lib/activeadmin_addons/support/input_helpers/select_helpers.rb +83 -0
- data/lib/activeadmin_addons/version.rb +1 -1
- data/lib/generators/activeadmin_addons/install/install_generator.rb +9 -2
- data/lib/generators/activeadmin_addons/install/templates/initializer.rb +8 -0
- data/{app/assets/javascripts → vendor/assets/jquery_palette_color_picker}/palette-color-picker.js +265 -172
- data/{app/assets/stylesheets → vendor/assets/jquery_palette_color_picker}/palette-color-picker.scss +155 -145
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/CHANGELOG.md +111 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/CONTRIBUTING.md +144 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/Gemfile +58 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/Guardfile +8 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/LICENSE +20 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/README.md +96 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/Rakefile +33 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/activeadmin.gemspec +66 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/assets/images/active_admin/datepicker/datepicker-input-icon.png +0 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/assets/images/active_admin/nested_menu_arrow.gif +0 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/assets/images/active_admin/nested_menu_arrow_dark.gif +0 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/assets/images/active_admin/orderable.png +0 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/assets/javascripts/active_admin/application.js.coffee +37 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/assets/javascripts/active_admin/base.js.coffee +14 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/assets/javascripts/active_admin/ext/jquery-ui.js.coffee +6 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/assets/javascripts/active_admin/ext/jquery.js.coffee +7 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/assets/javascripts/active_admin/lib/batch_actions.js.coffee +39 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/assets/javascripts/active_admin/lib/checkbox-toggler.js.coffee +36 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/assets/javascripts/active_admin/lib/dropdown-menu.js.coffee +101 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/assets/javascripts/active_admin/lib/flash.js.coffee +19 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/assets/javascripts/active_admin/lib/has_many.js.coffee +79 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/assets/javascripts/active_admin/lib/modal_dialog.js.coffee +45 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/assets/javascripts/active_admin/lib/per_page.js.coffee +31 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/assets/javascripts/active_admin/lib/table-checkbox-toggler.js.coffee +24 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/assets/stylesheets/active_admin/_base.scss +41 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/assets/stylesheets/active_admin/_forms.scss +333 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/assets/stylesheets/active_admin/_header.scss +156 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/assets/stylesheets/active_admin/_mixins.scss +1 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/assets/stylesheets/active_admin/_typography.scss +100 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/assets/stylesheets/active_admin/components/_batch_actions.scss +11 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/assets/stylesheets/active_admin/components/_blank_slates.scss +30 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/assets/stylesheets/active_admin/components/_breadcrumbs.scss +20 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/assets/stylesheets/active_admin/components/_buttons.scss +6 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/assets/stylesheets/active_admin/components/_columns.scss +3 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/assets/stylesheets/active_admin/components/_comments.scss +41 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/assets/stylesheets/active_admin/components/_date_picker.scss +149 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/assets/stylesheets/active_admin/components/_dropdown_menu.scss +152 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/assets/stylesheets/active_admin/components/_flash_messages.scss +37 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/assets/stylesheets/active_admin/components/_grid.scss +9 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/assets/stylesheets/active_admin/components/_index_list.scss +12 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/assets/stylesheets/active_admin/components/_links.scss +5 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/assets/stylesheets/active_admin/components/_modal_dialog.scss +34 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/assets/stylesheets/active_admin/components/_pagination.scss +44 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/assets/stylesheets/active_admin/components/_panels.scss +6 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/assets/stylesheets/active_admin/components/_scopes.scss +10 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/assets/stylesheets/active_admin/components/_status_tags.scss +16 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/assets/stylesheets/active_admin/components/_table_tools.scss +67 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/assets/stylesheets/active_admin/components/_tables.scss +110 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/assets/stylesheets/active_admin/components/_tabs.scss +65 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/assets/stylesheets/active_admin/components/_unsupported_browser.scss +16 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/assets/stylesheets/active_admin/mixins/_all.scss +10 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/assets/stylesheets/active_admin/mixins/_buttons.scss +65 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/assets/stylesheets/active_admin/mixins/_gradients.scss +28 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/assets/stylesheets/active_admin/mixins/_reset.scss +165 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/assets/stylesheets/active_admin/mixins/_rounded.scss +22 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/assets/stylesheets/active_admin/mixins/_sections.scss +41 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/assets/stylesheets/active_admin/mixins/_shadows.scss +15 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/assets/stylesheets/active_admin/mixins/_typography.scss +3 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/assets/stylesheets/active_admin/mixins/_utilities.scss +17 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/assets/stylesheets/active_admin/mixins/_variables.scss +34 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/assets/stylesheets/active_admin/pages/_logged_out.scss +44 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/assets/stylesheets/active_admin/print.scss +288 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/assets/stylesheets/active_admin/structure/_footer.scss +14 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/assets/stylesheets/active_admin/structure/_main_structure.scss +29 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/assets/stylesheets/active_admin/structure/_title_bar.scss +41 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/views/active_admin/devise/confirmations/new.html.erb +15 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/views/active_admin/devise/mailer/reset_password_instructions.html.erb +8 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/views/active_admin/devise/mailer/unlock_instructions.html.erb +7 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/views/active_admin/devise/passwords/edit.html.erb +18 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/views/active_admin/devise/passwords/new.html.erb +15 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/views/active_admin/devise/registrations/new.html.erb +22 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/views/active_admin/devise/sessions/new.html.erb +20 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/views/active_admin/devise/shared/_links.erb +27 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/views/active_admin/devise/unlocks/new.html.erb +15 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/views/active_admin/page/index.html.arb +1 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/views/active_admin/resource/edit.html.arb +1 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/views/active_admin/resource/index.html.arb +1 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/views/active_admin/resource/new.html.arb +1 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/views/active_admin/resource/show.html.arb +1 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/views/layouts/active_admin.html.arb +1 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/app/views/layouts/active_admin_logged_out.html.erb +39 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/config/locales/ar.yml +132 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/config/locales/bg.yml +121 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/config/locales/bs.yml +122 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/config/locales/ca.yml +107 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/config/locales/cs.yml +110 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/config/locales/da.yml +106 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/config/locales/de-CH.yml +102 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/config/locales/de.yml +134 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/config/locales/el.yml +127 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/config/locales/en-GB.yml +98 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/config/locales/en.yml +135 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/config/locales/es-MX.yml +94 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/config/locales/es.yml +135 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/config/locales/fa.yml +120 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/config/locales/fi.yml +113 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/config/locales/fr.yml +118 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/config/locales/he.yml +95 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/config/locales/hr.yml +124 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/config/locales/hu.yml +99 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/config/locales/it.yml +117 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/config/locales/ja.yml +135 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/config/locales/ko.yml +120 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/config/locales/lt.yml +121 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/config/locales/lv.yml +93 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/config/locales/nb.yml +116 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/config/locales/nl.yml +134 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/config/locales/pl.yml +98 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/config/locales/pt-BR.yml +132 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/config/locales/pt-PT.yml +93 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/config/locales/ro.yml +97 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/config/locales/ru.yml +138 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/config/locales/sv-SE.yml +133 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/config/locales/tr.yml +97 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/config/locales/uk.yml +136 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/config/locales/vi.yml +94 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/config/locales/zh-CN.yml +111 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/config/locales/zh-TW.yml +127 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/cucumber.yml +3 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/docs/0-installation.md +98 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/docs/1-general-configuration.md +149 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/docs/10-custom-pages.md +106 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/docs/11-decorators.md +55 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/docs/12-arbre-components.md +150 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/docs/13-authorization-adapter.md +248 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/docs/14-gotchas.md +92 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/docs/2-resource-customization.md +409 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/docs/3-index-pages.md +272 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/docs/3-index-pages/custom-index.md +31 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/docs/3-index-pages/index-as-block.md +21 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/docs/3-index-pages/index-as-blog.md +71 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/docs/3-index-pages/index-as-grid.md +29 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/docs/3-index-pages/index-as-table.md +199 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/docs/4-csv-format.md +39 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/docs/5-forms.md +159 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/docs/6-show-pages.md +105 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/docs/7-sidebars.md +71 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/docs/8-custom-actions.md +160 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/docs/9-batch-actions.md +233 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/docs/README.md +24 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/action_item.feature +73 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/authorization.feature +64 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/authorization_cancan.feature +52 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/authorization_pundit.feature +37 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/belongs_to.feature +66 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/breadcrumb.feature +75 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/comments/commenting.feature +171 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/comments/viewing_index.feature +19 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/dashboard.feature +16 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/decorators.feature +41 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/development_reloading.feature +30 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/edit_page.feature +117 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/favicon.feature +20 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/first_boot.feature +16 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/global_navigation.feature +29 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/i18n.feature +43 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/index/batch_actions.feature +183 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/index/filters.feature +161 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/index/format_as_csv.feature +203 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/index/formats.feature +66 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/index/index_as_block.feature +15 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/index/index_as_blog.feature +69 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/index/index_as_grid.feature +45 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/index/index_as_table.feature +291 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/index/index_blank_slate.feature +83 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/index/index_parameters.feature +75 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/index/index_scope_to.feature +56 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/index/index_scopes.feature +251 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/index/page_title.feature +41 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/index/pagination.feature +63 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/index/switch_index_view.feature +73 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/menu.feature +53 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/meta_tags.feature +21 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/new_page.feature +109 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/registering_assets.feature +34 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/registering_pages.feature +148 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/registering_resources.feature +33 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/renamed_resource.feature +32 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/root_to.feature +17 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/show/columns.feature +40 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/show/default_content.feature +44 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/show/page_title.feature +58 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/show/tabs.feature +27 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/sidebar_sections.feature +210 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/site_title.feature +47 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/specifying_actions.feature +93 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/step_definitions/action_item_steps.rb +7 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/step_definitions/action_link_steps.rb +20 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/step_definitions/additional_web_steps.rb +81 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/step_definitions/asset_steps.rb +15 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/step_definitions/attribute_steps.rb +18 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/step_definitions/batch_action_steps.rb +81 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/step_definitions/blog_steps.rb +3 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/step_definitions/breadcrumb_steps.rb +3 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/step_definitions/column_steps.rb +8 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/step_definitions/comment_steps.rb +12 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/step_definitions/configuration_steps.rb +100 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/step_definitions/dashboard_steps.rb +15 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/step_definitions/factory_steps.rb +35 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/step_definitions/filter_steps.rb +39 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/step_definitions/flash_steps.rb +11 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/step_definitions/format_steps.rb +52 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/step_definitions/i18n_steps.rb +3 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/step_definitions/index_scope_steps.rb +21 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/step_definitions/index_views_steps.rb +3 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/step_definitions/layout_steps.rb +3 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/step_definitions/member_link_steps.rb +7 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/step_definitions/menu_steps.rb +11 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/step_definitions/meta_tag_steps.rb +3 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/step_definitions/pagination_steps.rb +15 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/step_definitions/sidebar_steps.rb +13 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/step_definitions/site_title_steps.rb +17 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/step_definitions/symbol_leak_steps.rb +3 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/step_definitions/tab_steps.rb +8 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/step_definitions/table_steps.rb +120 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/step_definitions/user_steps.rb +45 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/step_definitions/web_steps.rb +85 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/sti_resource.feature +65 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/strong_parameters.feature +73 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/support/env.rb +145 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/support/paths.rb +71 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/support/selectors.rb +45 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/symbol_leak.feature +35 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/users/logging_in.feature +34 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/users/logging_out.feature +13 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/features/users/resetting_password.feature +34 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin.rb +130 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/abstract_view_factory.rb +85 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/application.rb +317 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/asset_registration.rb +29 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/authorization_adapter.rb +132 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/base_controller.rb +77 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/base_controller/authorization.rb +133 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/base_controller/menu.rb +34 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/batch_actions.rb +16 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/batch_actions/controller.rb +41 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/batch_actions/resource_extension.rb +158 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/batch_actions/views/batch_action_form.rb +38 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/batch_actions/views/batch_action_selector.rb +57 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/batch_actions/views/selection_cells.rb +37 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/callbacks.rb +88 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/cancan_adapter.rb +36 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/component.rb +5 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/controller_action.rb +12 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/csv_builder.rb +126 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/dependency.rb +95 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/deprecation.rb +35 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/devise.rb +80 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/dsl.rb +173 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/engine.rb +16 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/error.rb +62 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/event.rb +24 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/filters.rb +9 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/filters/active.rb +29 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/filters/dsl.rb +21 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/filters/forms.rb +83 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/filters/formtastic_addons.rb +79 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/filters/humanized.rb +68 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/filters/resource_extension.rb +190 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/form_builder.rb +141 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/generators/boilerplate.rb +37 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/helpers/collection.rb +17 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/helpers/i18n.rb +7 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/helpers/optional_display.rb +38 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/helpers/routes/url_helpers.rb +15 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/helpers/scope_chain.rb +23 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/helpers/settings.rb +115 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/inputs.rb +20 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/inputs/datepicker_input.rb +20 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/inputs/filters/base.rb +42 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/inputs/filters/base/search_method_select.rb +75 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/inputs/filters/boolean_input.rb +24 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/inputs/filters/check_boxes_input.rb +50 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/inputs/filters/date_picker_input.rb +13 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/inputs/filters/date_range_input.rb +36 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/inputs/filters/numeric_input.rb +12 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/inputs/filters/select_input.rb +54 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/inputs/filters/string_input.rb +26 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/menu.rb +108 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/menu_collection.rb +93 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/menu_item.rb +97 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/namespace.rb +247 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/order_clause.rb +26 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/orm/active_record.rb +5 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/orm/active_record/comments.rb +90 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/orm/active_record/comments/comment.rb +45 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/orm/active_record/comments/namespace_helper.rb +14 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/orm/active_record/comments/resource_helper.rb +17 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/orm/active_record/comments/show_page_helper.rb +23 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/orm/active_record/comments/views.rb +2 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/orm/active_record/comments/views/active_admin_comments.rb +88 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/orm/mongoid.rb +1 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/page.rb +92 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/page_controller.rb +29 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/page_dsl.rb +28 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/page_presenter.rb +32 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/pundit_adapter.rb +68 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/resource.rb +168 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/resource/action_items.rb +108 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/resource/belongs_to.rb +44 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/resource/controllers.rb +19 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/resource/includes.rb +12 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/resource/menu.rb +64 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/resource/naming.rb +62 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/resource/page_presenters.rb +82 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/resource/pagination.rb +23 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/resource/routes.rb +115 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/resource/scope_to.rb +74 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/resource/scopes.rb +50 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/resource/sidebars.rb +28 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/resource_collection.rb +72 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/resource_controller.rb +51 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/resource_controller/action_builder.rb +21 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/resource_controller/data_access.rb +304 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/resource_controller/decorators.rb +102 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/resource_controller/resource_class_methods.rb +24 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/resource_controller/scoping.rb +31 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/resource_controller/sidebars.rb +18 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/resource_controller/streaming.rb +37 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/resource_dsl.rb +184 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/router.rb +106 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/scope.rb +57 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/sidebar_section.rb +37 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/version.rb +3 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/view_factory.rb +27 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/view_helpers.rb +19 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/view_helpers/active_admin_application_helper.rb +12 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/view_helpers/auto_link_helper.rb +45 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/view_helpers/breadcrumb_helper.rb +33 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/view_helpers/display_helper.rb +61 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/view_helpers/download_format_links_helper.rb +46 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/view_helpers/fields_for.rb +50 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/view_helpers/flash_helper.rb +14 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/view_helpers/form_helper.rb +20 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/view_helpers/method_or_proc_helper.rb +93 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/view_helpers/sidebar_helper.rb +15 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/view_helpers/title_helper.rb +11 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/view_helpers/view_factory_helper.rb +11 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/views.rb +8 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/views/action_items.rb +17 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/views/components/active_admin_form.rb +123 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/views/components/attributes_table.rb +112 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/views/components/blank_slate.rb +17 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/views/components/columns.rb +161 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/views/components/dropdown_menu.rb +71 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/views/components/index_list.rb +68 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/views/components/paginated_collection.rb +163 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/views/components/panel.rb +38 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/views/components/scopes.rb +66 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/views/components/sidebar_section.rb +34 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/views/components/site_title.rb +55 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/views/components/status_tag.rb +80 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/views/components/table_for.rb +237 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/views/components/tabs.rb +28 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/views/components/unsupported_browser.rb +11 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/views/footer.rb +20 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/views/header.rb +32 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/views/index_as_block.rb +36 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/views/index_as_blog.rb +156 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/views/index_as_grid.rb +80 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/views/index_as_table.rb +351 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/views/pages/base.rb +147 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/views/pages/form.rb +61 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/views/pages/index.rb +163 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/views/pages/layout.rb +26 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/views/pages/page.rb +30 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/views/pages/show.rb +59 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/views/tabbed_navigation.rb +66 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/active_admin/views/title_bar.rb +55 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/activeadmin.rb +1 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/generators/active_admin/assets/assets_generator.rb +14 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/generators/active_admin/assets/templates/active_admin.js.coffee +1 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/generators/active_admin/assets/templates/active_admin.scss +17 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/generators/active_admin/devise/devise_generator.rb +65 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/generators/active_admin/install/install_generator.rb +45 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/generators/active_admin/install/templates/active_admin.rb.erb +262 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/generators/active_admin/install/templates/admin_user.rb.erb +30 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/generators/active_admin/install/templates/dashboard.rb +33 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/generators/active_admin/install/templates/migrations/create_active_admin_comments.rb +19 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/generators/active_admin/page/USAGE +8 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/generators/active_admin/page/page_generator.rb +12 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/generators/active_admin/page/templates/page.rb +5 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/generators/active_admin/resource/resource_generator.rb +20 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/generators/active_admin/resource/templates/admin.rb +39 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/lib/ransack_ext.rb +12 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/script/local +44 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/script/travis_cache +107 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/script/use_rails +53 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/javascripts/coffeescripts/jquery.aa.checkbox-toggler-spec.js.coffee +50 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/javascripts/coffeescripts/jquery.aa.flash.js.coffee +25 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/javascripts/coffeescripts/jquery.aa.table-checkbox-toggler-spec.js.coffee +34 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/javascripts/fixtures/checkboxes.html +9 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/javascripts/fixtures/flashes.html +2 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/javascripts/fixtures/table_checkboxes.html +17 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/javascripts/helpers/SpecHelper.js +3 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/javascripts/support/jasmine.yml +74 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/javascripts/support/jasmine_config.rb +23 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/javascripts/support/jasmine_runner.rb +32 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/rails_helper.rb +158 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/requests/default_namespace_spec.rb +61 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/requests/javascript_spec.rb +20 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/requests/memory_spec.rb +21 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/requests/stylesheets_spec.rb +18 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/spec_helper.rb +17 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/support/active_admin_request_helpers.rb +27 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/support/deferred_garbage_collection.rb +19 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/support/detect_rails_version.rb +34 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/support/jslint.yml +80 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/support/rails_template.rb +145 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/support/rails_template_with_data.rb +59 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/support/templates/admin/stores.rb +9 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/support/templates/cucumber.rb +24 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/support/templates/cucumber_with_reloading.rb +5 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/support/templates/en.yml +8 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/support/templates/policies/active_admin/comment_policy.rb +9 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/support/templates/policies/active_admin/page_policy.rb +18 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/support/templates/policies/admin_user_policy.rb +11 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/support/templates/policies/application_policy.rb +45 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/support/templates/policies/category_policy.rb +7 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/support/templates/policies/post_policy.rb +15 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/support/templates/policies/store_policy.rb +11 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/support/templates/policies/user_policy.rb +11 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/support/templates/post_decorator.rb +11 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/abstract_view_factory_spec.rb +79 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/action_builder_spec.rb +132 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/active_admin_spec.rb +11 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/application_spec.rb +165 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/asset_registration_spec.rb +52 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/authorization/authorization_adapter_spec.rb +61 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/authorization/controller_authorization_spec.rb +39 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/authorization/index_overriding_spec.rb +22 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/auto_link_spec.rb +69 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/batch_actions/resource_spec.rb +97 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/batch_actions/settings_spec.rb +61 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/belongs_to_spec.rb +65 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/cancan_adapter_spec.rb +43 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/comments_spec.rb +188 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/component_spec.rb +18 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/config_shared_examples.rb +59 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/controller_filters_spec.rb +41 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/csv_builder_spec.rb +244 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/dependency_spec.rb +135 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/devise_spec.rb +96 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/dsl_spec.rb +122 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/filters/filter_form_builder_spec.rb +433 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/filters/humanized_spec.rb +44 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/filters/resource_spec.rb +121 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/form_builder_spec.rb +812 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/generators/install_spec.rb +24 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/helpers/collection_spec.rb +65 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/helpers/scope_chain_spec.rb +36 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/helpers/settings_spec.rb +30 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/i18n_spec.rb +12 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/menu_collection_spec.rb +62 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/menu_item_spec.rb +143 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/menu_spec.rb +71 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/namespace/authorization_spec.rb +27 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/namespace/register_page_spec.rb +74 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/namespace/register_resource_spec.rb +161 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/namespace_spec.rb +103 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/order_clause_spec.rb +81 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/page_controller_spec.rb +5 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/page_spec.rb +78 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/pretty_format_spec.rb +77 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/pundit_adapter_spec.rb +98 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/resource/action_items_spec.rb +65 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/resource/includes_spec.rb +21 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/resource/menu_spec.rb +18 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/resource/naming_spec.rb +122 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/resource/page_presenters_spec.rb +44 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/resource/pagination_spec.rb +38 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/resource/routes_spec.rb +73 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/resource/scopes_spec.rb +50 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/resource/sidebars_spec.rb +43 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/resource_collection_spec.rb +175 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/resource_controller/data_access_spec.rb +140 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/resource_controller/decorators_spec.rb +83 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/resource_controller/sidebars_spec.rb +45 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/resource_controller_spec.rb +269 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/resource_registration_spec.rb +56 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/resource_spec.rb +329 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/routing_spec.rb +180 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/scope_spec.rb +190 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/settings_spec.rb +118 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/view_factory_spec.rb +19 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/view_helpers/breadcrumbs_spec.rb +217 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/view_helpers/display_name_spec.rb +71 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/view_helpers/download_format_links_helper_spec.rb +39 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/view_helpers/fields_for_spec.rb +50 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/view_helpers/flash_helper_spec.rb +25 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/view_helpers/form_helper_spec.rb +43 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/view_helpers/method_or_proc_helper_spec.rb +139 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/views/components/attributes_table_spec.rb +272 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/views/components/batch_action_selector_spec.rb +43 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/views/components/blank_slate_spec.rb +27 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/views/components/columns_spec.rb +189 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/views/components/index_list_spec.rb +35 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/views/components/index_table_for_spec.rb +46 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/views/components/paginated_collection_spec.rb +250 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/views/components/panel_spec.rb +58 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/views/components/sidebar_section_spec.rb +68 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/views/components/site_title_spec.rb +78 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/views/components/status_tag_spec.rb +249 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/views/components/table_for_spec.rb +429 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/views/components/tabs_spec.rb +39 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/views/components/unsupported_browser_spec.rb +47 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/views/pages/form_spec.rb +42 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/views/pages/index_spec.rb +60 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/views/pages/layout_spec.rb +59 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/views/pages/show_spec.rb +33 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/spec/unit/views/tabbed_navigation_spec.rb +158 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/tasks/docs.rake +37 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/tasks/parallel_tests.rake +66 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/tasks/test.rake +83 -0
- data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/tasks/yard.rake +9 -0
- metadata +567 -22
- data/app/assets/external/palette-color-picker/LICENSE.md +0 -21
- data/app/assets/javascripts/activeadmin_addons/select2.js +0 -209
- data/lib/activeadmin_addons/addons/bool_values.rb +0 -46
- data/lib/activeadmin_addons/addons/enum_tag.rb +0 -36
- data/lib/activeadmin_addons/addons/list.rb +0 -84
- data/lib/activeadmin_addons/addons/paperclip_image.rb +0 -25
data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/docs/13-authorization-adapter.md
ADDED
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
# Authorization Adapter
|
|
2
|
+
|
|
3
|
+
Active Admin offers the ability to define and use your own authorization
|
|
4
|
+
adapter. If implemented, the '#authorized?' will be called when an action is
|
|
5
|
+
taken. By default, '#authorized?' returns true.
|
|
6
|
+
|
|
7
|
+
## Setting up your own AuthorizationAdapter
|
|
8
|
+
|
|
9
|
+
Setting up your own `AuthorizationAdapter` is easy! The following example shows
|
|
10
|
+
how to set up and tie your authorization adapter class to Active Admin:
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
# app/models/only_authors_authorization.rb
|
|
14
|
+
class OnlyAuthorsAuthorization < ActiveAdmin::AuthorizationAdapter
|
|
15
|
+
|
|
16
|
+
def authorized?(action, subject = nil)
|
|
17
|
+
case subject
|
|
18
|
+
when normalized(Post)
|
|
19
|
+
# Only let the author update and delete posts
|
|
20
|
+
if action == :update || action == :destroy
|
|
21
|
+
subject.author == user
|
|
22
|
+
else
|
|
23
|
+
true
|
|
24
|
+
end
|
|
25
|
+
else
|
|
26
|
+
true
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
end
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
In order to hook up `OnlyAuthorsAuthorization` to Active Admin, go to your
|
|
34
|
+
application's `config/initializers/active_admin.rb` and add/modify the line:
|
|
35
|
+
|
|
36
|
+
```ruby
|
|
37
|
+
config.authorization_adapter = "OnlyAuthorsAuthorization"
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Authorization adapters can be configured per ActiveAdmin namespace as well, for example:
|
|
41
|
+
|
|
42
|
+
```ruby
|
|
43
|
+
ActiveAdmin.setup do |config|
|
|
44
|
+
config.namespace :admin do |ns|
|
|
45
|
+
ns.authorization_adapter = "AdminAuthorization"
|
|
46
|
+
end
|
|
47
|
+
config.namespace :my do |ns|
|
|
48
|
+
ns.authorization_adapter = "DashboardAuthorization"
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Now, whenever a controller action is performed, the `OnlyAuthorsAuthorization`'s
|
|
54
|
+
`#authorized?` method will be called.
|
|
55
|
+
|
|
56
|
+
## Getting Access to the Current User
|
|
57
|
+
|
|
58
|
+
From within your authorization adapter, you can call the `#user` method to
|
|
59
|
+
retrieve the current user.
|
|
60
|
+
|
|
61
|
+
```ruby
|
|
62
|
+
class OnlyAdmins < ActiveAdmin::AuthorizationAdapter
|
|
63
|
+
|
|
64
|
+
def authorized?(action, subject = nil)
|
|
65
|
+
user.admin?
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
end
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Scoping Collections in Authorization Adapters
|
|
72
|
+
|
|
73
|
+
`ActiveAdmin::AuthorizationAdapter` also provides a hook method (`#scope_collection`)
|
|
74
|
+
for the adapter to scope the resource's collection. For example, you may want to
|
|
75
|
+
centralize the scoping:
|
|
76
|
+
|
|
77
|
+
```ruby
|
|
78
|
+
class OnlyMyAccount < ActiveAdmin::AuthorizationAdapter
|
|
79
|
+
|
|
80
|
+
def authorized?(action, subject = nil)
|
|
81
|
+
subject.account == user.account
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
def scope_collection(collection, action = Auth::READ)
|
|
85
|
+
collection.where(account_id: user.account_id)
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
end
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
All collections presented on Index Screens will be passed through this method
|
|
92
|
+
and will be scoped accordingly.
|
|
93
|
+
|
|
94
|
+
## Managing Access to Pages
|
|
95
|
+
|
|
96
|
+
Pages, just like resources, get authorized also. When authorization a page, the
|
|
97
|
+
subject will be an instance of `ActiveAdmin::Page`.
|
|
98
|
+
|
|
99
|
+
```ruby
|
|
100
|
+
class OnlyDashboard < ActiveAdmin::AuthorizationAdapter
|
|
101
|
+
def authorized?(action, subject = nil)
|
|
102
|
+
case subject
|
|
103
|
+
when ActiveAdmin::Page
|
|
104
|
+
action == :read && subject.name == "Dashboard" && subject.namespace.name == :admin
|
|
105
|
+
else
|
|
106
|
+
false
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Action Types
|
|
113
|
+
|
|
114
|
+
By default Active Admin simplifies the controller actions into 4 actions:
|
|
115
|
+
|
|
116
|
+
* `:read` - This controls if the user can view the menu item as well as the
|
|
117
|
+
index and show screens.
|
|
118
|
+
* `:create` - This controls if the user can view the new screen and submit
|
|
119
|
+
the form to the create action.
|
|
120
|
+
* `:update` - This controls if the user can view the edit screen and submit
|
|
121
|
+
the form to the update action.
|
|
122
|
+
* `:destroy` - This controls if the user can delete a resource.
|
|
123
|
+
|
|
124
|
+
Each of these actions is available as a constant. Eg: `:read` is available as
|
|
125
|
+
`ActiveAdmin::Authorization::READ`.
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
## Checking for Authorization in Controllers and Views
|
|
129
|
+
|
|
130
|
+
Active Admin provides a helper method to check if the current user is
|
|
131
|
+
authorized to perform an action on a subject.
|
|
132
|
+
|
|
133
|
+
Simply use the `#authorized?(action, subject) method to check.
|
|
134
|
+
|
|
135
|
+
```ruby
|
|
136
|
+
ActiveAdmin.register Post do
|
|
137
|
+
|
|
138
|
+
index do
|
|
139
|
+
column :title
|
|
140
|
+
column '' do |post|
|
|
141
|
+
link_to 'Edit', admin_post_path(post) if authorized? :update, post
|
|
142
|
+
end
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
end
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
If you are implementing a custom controller action, you can use the
|
|
149
|
+
`#authorize!` method to raise an `ActiveAdmin::AccessDenied` exception.
|
|
150
|
+
|
|
151
|
+
```ruby
|
|
152
|
+
ActiveAdmin.register Post do
|
|
153
|
+
|
|
154
|
+
member_action :publish, method: :post do
|
|
155
|
+
post = Post.find(params[:id])
|
|
156
|
+
|
|
157
|
+
authorize! :publish, post
|
|
158
|
+
post.publish!
|
|
159
|
+
|
|
160
|
+
flash[:notice] = "Post has been published"
|
|
161
|
+
redirect_to [:admin, post]
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
action_item :publish, only: :show do
|
|
165
|
+
if !post.published? && authorized?(:publish, post)
|
|
166
|
+
link_to "Publish", publish_admin_post_path(post), method: :post
|
|
167
|
+
end
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
end
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
## Using the CanCan Adapter
|
|
174
|
+
|
|
175
|
+
Sub-classing `ActiveAdmin::AuthorizationAdapter` is fairly low level. Many times
|
|
176
|
+
it's nicer to have a simpler DSL for managing authorization. Active Admin
|
|
177
|
+
provides an adapter out of the box for [CanCan](https://github.com/ryanb/cancan)
|
|
178
|
+
and [CanCanCan](https://github.com/CanCanCommunity/cancancan).
|
|
179
|
+
|
|
180
|
+
To use the CanCan adapter, simply update the configuration in the Active Admin
|
|
181
|
+
initializer:
|
|
182
|
+
|
|
183
|
+
```ruby
|
|
184
|
+
config.authorization_adapter = ActiveAdmin::CanCanAdapter
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
You can also specify a method to be called on unauthorized access. This is necessary
|
|
188
|
+
in order to prevent a redirect loop that can happen if a user tries to access a page
|
|
189
|
+
they don't have permissions for (see [#2081](https://github.com/activeadmin/activeadmin/issues/2081)).
|
|
190
|
+
|
|
191
|
+
```ruby
|
|
192
|
+
config.on_unauthorized_access = :access_denied
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
The method `access_denied` would be defined in `application_controller.rb`. Here is one
|
|
196
|
+
example that redirects the user from the page they don't have permission to
|
|
197
|
+
access to a resource they have permission to access (organizations in this case), and
|
|
198
|
+
also displays the error message in the browser:
|
|
199
|
+
|
|
200
|
+
```ruby
|
|
201
|
+
class ApplicationController < ActionController::Base
|
|
202
|
+
protect_from_forgery
|
|
203
|
+
|
|
204
|
+
def access_denied(exception)
|
|
205
|
+
redirect_to admin_organizations_path, alert: exception.message
|
|
206
|
+
end
|
|
207
|
+
end
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
By default this will use the ability class named "Ability". This can also be
|
|
211
|
+
changed from the initializer:
|
|
212
|
+
|
|
213
|
+
```ruby
|
|
214
|
+
config.cancan_ability_class = "MyCustomAbility"
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
Now you can simply use CanCan or CanCanCan the way that you would expect and
|
|
218
|
+
Active Admin will use it for authorization:
|
|
219
|
+
|
|
220
|
+
```ruby
|
|
221
|
+
# app/models/ability.rb
|
|
222
|
+
class Ability
|
|
223
|
+
include CanCan::Ability
|
|
224
|
+
|
|
225
|
+
def initialize(user)
|
|
226
|
+
can :manage, Post
|
|
227
|
+
can :read, User
|
|
228
|
+
can :manage, User, id: user.id
|
|
229
|
+
can :read, ActiveAdmin::Page, name: "Dashboard", namespace_name: :admin
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
end
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
To view more details about the API's, visit project pages of [CanCan](https://github.com/ryanb/cancan) and [CanCanCan](https://github.com/CanCanCommunity/cancancan).
|
|
236
|
+
|
|
237
|
+
## Using the Pundit Adapter
|
|
238
|
+
|
|
239
|
+
Active Admin provides an adapter out of the box also for [Pundit](https://github.com/elabs/pundit).
|
|
240
|
+
|
|
241
|
+
To use the Pundit adapter, simply update the configuration in the Active Admin
|
|
242
|
+
initializer:
|
|
243
|
+
|
|
244
|
+
```ruby
|
|
245
|
+
config.authorization_adapter = ActiveAdmin::PunditAdapter
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
You can simply use Pundit the way that you would expect and Active Admin will use it for authorization. Check Pundit's documentation to [set up Pundit in your application](https://github.com/elabs/pundit#installation). If you want to use batch actions just ensure that `destroy_all?` method is defined in your policy class. You can use this [template policy](https://github.com/activeadmin/activeadmin/blob/master/spec/support/templates/policies/application_policy.rb) in your application instead of default one generated by Pundit's `rails g pundit:install` command.
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
#Gotchas
|
|
2
|
+
|
|
3
|
+
## Session Commits & Asset Pipeline
|
|
4
|
+
|
|
5
|
+
When configuring the asset pipeline ensure that the asset prefix
|
|
6
|
+
(`config.assets.prefix`) is not the same as the namespace of ActiveAdmin
|
|
7
|
+
(default namespace is `/admin`). If they are the same Sprockets will prevent the
|
|
8
|
+
session from being committed. Flash messages won't work and you will be unable to
|
|
9
|
+
use the session for storing anything.
|
|
10
|
+
|
|
11
|
+
For more information see the following post:
|
|
12
|
+
[http://www.intridea.com/blog/2013/3/20/rails-assets-prefix-may-disable-your-session](http://www.intridea.com/blog/2013/3/20/rails-assets-prefix-may-disable-your-session)
|
|
13
|
+
|
|
14
|
+
## Helpers
|
|
15
|
+
|
|
16
|
+
There are two knowing gotchas with helpers. This hopefully will help you to
|
|
17
|
+
find a solution.
|
|
18
|
+
|
|
19
|
+
### Helpers are not reloading in development
|
|
20
|
+
|
|
21
|
+
This is a known and still open [issue](https://github.com/activeadmin/activeadmin/issues/697)
|
|
22
|
+
the only way is to restart your server each time you change a helper.
|
|
23
|
+
|
|
24
|
+
### Helper maybe not included by default
|
|
25
|
+
|
|
26
|
+
If you use `config.action_controller.include_all_helpers = false` in your application config,
|
|
27
|
+
you need to include it by hand.
|
|
28
|
+
|
|
29
|
+
#### Solutions
|
|
30
|
+
|
|
31
|
+
##### First use a monkey patch
|
|
32
|
+
|
|
33
|
+
This works for all ActiveAdmin resources at once.
|
|
34
|
+
|
|
35
|
+
```ruby
|
|
36
|
+
# config/initializers/active_admin_helpers.rb
|
|
37
|
+
ActiveAdmin::BaseController.class_eval do
|
|
38
|
+
helper ApplicationHelper
|
|
39
|
+
end
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
##### Second use the `controller` method
|
|
43
|
+
|
|
44
|
+
This works only for one resource at a time.
|
|
45
|
+
|
|
46
|
+
```ruby
|
|
47
|
+
ActiveAdmin.register User do
|
|
48
|
+
controller do
|
|
49
|
+
helper UserHelper
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## CSS
|
|
55
|
+
|
|
56
|
+
In order to avoid the override of your application style with the Active Admin one, you can do one of this things:
|
|
57
|
+
* You can properly move the generated file `active_admin.scss` from `app/assets/stylesheets` to `vendor/assets/stylesheets`.
|
|
58
|
+
* You can remove all `require_tree` comands from your root level css files, where the `active_admin.scss` is in the tree.
|
|
59
|
+
|
|
60
|
+
## Conflicts
|
|
61
|
+
|
|
62
|
+
### With gems that provides a `search` class method on a model
|
|
63
|
+
|
|
64
|
+
If a gem defines a `search` class method on a model, this can result in conflicts
|
|
65
|
+
with the same method provided by `ransack` (a dependency of ActiveAdmin).
|
|
66
|
+
|
|
67
|
+
Each of this conflicts need to solved is a different way. Some solutions are
|
|
68
|
+
listed below.
|
|
69
|
+
|
|
70
|
+
#### `tire`, `retire` and `elasticsearch-rails`
|
|
71
|
+
|
|
72
|
+
This conflict can be solved, by using explicitly the `search` method of `tire`,
|
|
73
|
+
`retire` or `elasticsearch-rails`:
|
|
74
|
+
|
|
75
|
+
##### For `tire` and `retire`
|
|
76
|
+
|
|
77
|
+
```ruby
|
|
78
|
+
YourModel.tire.search
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
##### For `elasticsearch-rails`
|
|
82
|
+
|
|
83
|
+
```ruby
|
|
84
|
+
YourModel.__elasticsearch__.search
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Sunspot Solr
|
|
88
|
+
|
|
89
|
+
```ruby
|
|
90
|
+
YourModel.solr_search
|
|
91
|
+
```
|
|
92
|
+
|
data/vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-a5a53c3f2b8f/docs/2-resource-customization.md
ADDED
|
@@ -0,0 +1,409 @@
|
|
|
1
|
+
# Working with Resources
|
|
2
|
+
|
|
3
|
+
Every Active Admin resource corresponds to a Rails model. So before creating a
|
|
4
|
+
resource you must first create a Rails model for it.
|
|
5
|
+
|
|
6
|
+
## Create a Resource
|
|
7
|
+
|
|
8
|
+
The basic command for creating a resource is `rails g active_admin:resource Post`.
|
|
9
|
+
The generator will produce an empty `app/admin/post.rb` file like so:
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
ActiveAdmin.register Post do
|
|
13
|
+
# everything happens here :D
|
|
14
|
+
end
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Setting up Strong Parameters
|
|
18
|
+
|
|
19
|
+
Rails 4 replaces `attr_accessible` with [Strong Parameters](https://github.com/rails/strong_parameters),
|
|
20
|
+
which moves attribute whitelisting from the model to the controller.
|
|
21
|
+
|
|
22
|
+
Use the `permit_params` method to define which attributes may be changed:
|
|
23
|
+
|
|
24
|
+
```ruby
|
|
25
|
+
ActiveAdmin.register Post do
|
|
26
|
+
permit_params :title, :content, :publisher_id
|
|
27
|
+
end
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Any form field that sends multiple values (such as a HABTM association, or an array attribute)
|
|
31
|
+
needs to pass an empty array to `permit_params`:
|
|
32
|
+
|
|
33
|
+
If your HABTM is `roles`, you should permit `role_ids: []`
|
|
34
|
+
|
|
35
|
+
```ruby
|
|
36
|
+
ActiveAdmin.register Post do
|
|
37
|
+
permit_params :title, :content, :publisher_id, role_ids: []
|
|
38
|
+
end
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Nested associations in the same form also require an array, but it
|
|
42
|
+
needs to be filled with any attributes used.
|
|
43
|
+
|
|
44
|
+
```ruby
|
|
45
|
+
ActiveAdmin.register Post do
|
|
46
|
+
permit_params :title, :content, :publisher_id,
|
|
47
|
+
tags_attributes: [:id, :name, :description, :_destroy]
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Note that `accepts_nested_attributes_for` is still required:
|
|
51
|
+
class Post < ActiveRecord::Base
|
|
52
|
+
accepts_nested_attributes_for :tags, allow_destroy: true
|
|
53
|
+
end
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
If you want to dynamically choose which attributes can be set, pass a block:
|
|
57
|
+
|
|
58
|
+
```ruby
|
|
59
|
+
ActiveAdmin.register Post do
|
|
60
|
+
permit_params do
|
|
61
|
+
params = [:title, :content, :publisher_id]
|
|
62
|
+
params.push :author_id if current_user.admin?
|
|
63
|
+
params
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
The `permit_params` call creates a method called `permitted_params`. You should use this method when overriding `create` or `update` actions:
|
|
69
|
+
|
|
70
|
+
```ruby
|
|
71
|
+
ActiveAdmin.register Post do
|
|
72
|
+
controller do
|
|
73
|
+
def create
|
|
74
|
+
# Good
|
|
75
|
+
@post = Post.new(permitted_params[:post])
|
|
76
|
+
# Bad
|
|
77
|
+
@post = Post.new(params[:post])
|
|
78
|
+
|
|
79
|
+
if @post.save
|
|
80
|
+
# ...
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Disabling Actions on a Resource
|
|
88
|
+
|
|
89
|
+
All CRUD actions are enabled by default. These can be disabled for a given resource:
|
|
90
|
+
|
|
91
|
+
```ruby
|
|
92
|
+
ActiveAdmin.register Post do
|
|
93
|
+
actions :all, except: [:update, :destroy]
|
|
94
|
+
end
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## Rename the Resource
|
|
98
|
+
|
|
99
|
+
By default, any references to the resource (menu, routes, buttons, etc) in the
|
|
100
|
+
interface will use the name of the class. You can rename the resource by using
|
|
101
|
+
the `:as` option.
|
|
102
|
+
|
|
103
|
+
```ruby
|
|
104
|
+
ActiveAdmin.register Post, as: "Article"
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
The resource will then be available at `/admin/articles`.
|
|
108
|
+
|
|
109
|
+
## Customize the Namespace
|
|
110
|
+
|
|
111
|
+
We use the `admin` namespace by default, but you can use anything:
|
|
112
|
+
|
|
113
|
+
```ruby
|
|
114
|
+
# Available at /today/posts
|
|
115
|
+
ActiveAdmin.register Post, namespace: :today
|
|
116
|
+
|
|
117
|
+
# Available at /posts
|
|
118
|
+
ActiveAdmin.register Post, namespace: false
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Customize the Menu
|
|
122
|
+
|
|
123
|
+
The resource will be displayed in the global navigation by default. To disable
|
|
124
|
+
the resource from being displayed in the global navigation:
|
|
125
|
+
|
|
126
|
+
```ruby
|
|
127
|
+
ActiveAdmin.register Post do
|
|
128
|
+
menu false
|
|
129
|
+
end
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
The menu method accepts a hash with the following options:
|
|
133
|
+
|
|
134
|
+
* `:label` - The string or proc label to display in the menu. If it's a proc, it
|
|
135
|
+
will be called each time the menu is rendered.
|
|
136
|
+
* `:parent` - The string id (or label) of the parent used for this menu
|
|
137
|
+
* `:if` - A block or a symbol of a method to call to decide if the menu item
|
|
138
|
+
should be displayed
|
|
139
|
+
* `:priority` - The integer value of the priority, which defaults to `10`
|
|
140
|
+
|
|
141
|
+
### Labels
|
|
142
|
+
|
|
143
|
+
To change the name of the label in the menu:
|
|
144
|
+
|
|
145
|
+
```ruby
|
|
146
|
+
ActiveAdmin.register Post do
|
|
147
|
+
menu label: "My Posts"
|
|
148
|
+
end
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
If you want something more dynamic, pass a proc instead:
|
|
152
|
+
|
|
153
|
+
```ruby
|
|
154
|
+
ActiveAdmin.register Post do
|
|
155
|
+
menu label: proc{ I18n.t "mypost" }
|
|
156
|
+
end
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### Menu Priority
|
|
160
|
+
|
|
161
|
+
Menu items are sorted first by their numeric priority, then alphabetically. Since
|
|
162
|
+
every menu by default has a priority of `10`, the menu is normally alphabetical.
|
|
163
|
+
|
|
164
|
+
You can easily customize this:
|
|
165
|
+
|
|
166
|
+
```ruby
|
|
167
|
+
ActiveAdmin.register Post do
|
|
168
|
+
menu priority: 1 # so it's on the very left
|
|
169
|
+
end
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### Conditionally Showing / Hiding Menu Items
|
|
173
|
+
|
|
174
|
+
Menu items can be shown or hidden at runtime using the `:if` option.
|
|
175
|
+
```ruby
|
|
176
|
+
ActiveAdmin.register Post do
|
|
177
|
+
menu if: proc{ current_user.can_edit_posts? }
|
|
178
|
+
end
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
The proc will be called in the context of the view, so you have access to all
|
|
182
|
+
your helpers and current user session information.
|
|
183
|
+
|
|
184
|
+
### Drop Down Menus
|
|
185
|
+
|
|
186
|
+
In many cases, a single level navigation will not be enough to manage a large
|
|
187
|
+
application. In that case, you can group your menu items under a parent menu item.
|
|
188
|
+
|
|
189
|
+
```ruby
|
|
190
|
+
ActiveAdmin.register Post do
|
|
191
|
+
menu parent: "Blog"
|
|
192
|
+
end
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
Note that the "Blog" parent menu item doesn't even have to exist yet; it can be
|
|
196
|
+
dynamically generated for you.
|
|
197
|
+
|
|
198
|
+
### Customizing Parent Menu Items
|
|
199
|
+
|
|
200
|
+
All of the options given to a standard menu item are also available to
|
|
201
|
+
parent menu items. In the case of complex parent menu items, you should
|
|
202
|
+
configure them in the Active Admin initializer.
|
|
203
|
+
|
|
204
|
+
```ruby
|
|
205
|
+
# config/initializers/active_admin.rb
|
|
206
|
+
config.namespace :admin do |admin|
|
|
207
|
+
admin.build_menu do |menu|
|
|
208
|
+
menu.add label: 'Blog', priority: 0
|
|
209
|
+
end
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
# app/admin/post.rb
|
|
213
|
+
ActiveAdmin.register Post do
|
|
214
|
+
menu parent: 'Blog'
|
|
215
|
+
end
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
### Dynamic Parent Menu Items
|
|
219
|
+
|
|
220
|
+
While the above works fine, what if you want a parent menu item with a dynamic
|
|
221
|
+
name? Well, you have to refer to it by its `:id`.
|
|
222
|
+
|
|
223
|
+
```ruby
|
|
224
|
+
# config/initializers/active_admin.rb
|
|
225
|
+
config.namespace :admin do |admin|
|
|
226
|
+
admin.build_menu do |menu|
|
|
227
|
+
menu.add id: 'blog', label: proc{"Something dynamic"}, priority: 0
|
|
228
|
+
end
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
# app/admin/post.rb
|
|
232
|
+
ActiveAdmin.register Post do
|
|
233
|
+
menu parent: 'blog'
|
|
234
|
+
end
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
### Adding Custom Menu Items
|
|
238
|
+
|
|
239
|
+
Sometimes it's not enough to just customize the menu label. In this case, you
|
|
240
|
+
can customize the menu for the namespace within the Active Admin initializer.
|
|
241
|
+
|
|
242
|
+
```ruby
|
|
243
|
+
# config/initializers/active_admin.rb
|
|
244
|
+
config.namespace :admin do |admin|
|
|
245
|
+
admin.build_menu do |menu|
|
|
246
|
+
menu.add label: "The Application", url: "/", priority: 0
|
|
247
|
+
|
|
248
|
+
menu.add label: "Sites" do |sites|
|
|
249
|
+
sites.add label: "Google", url: "http://google.com", html_options: { target: :blank }
|
|
250
|
+
sites.add label: "Facebook", url: "http://facebook.com"
|
|
251
|
+
sites.add label: "Github", url: "http://github.com"
|
|
252
|
+
end
|
|
253
|
+
end
|
|
254
|
+
end
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
This will be registered on application start before your resources are loaded.
|
|
258
|
+
|
|
259
|
+
## Scoping the queries
|
|
260
|
+
|
|
261
|
+
If your administrators have different access levels, you may sometimes want to
|
|
262
|
+
scope what they have access to. Assuming your User model has the proper
|
|
263
|
+
has_many relationships, you can simply scope the listings and finders like so:
|
|
264
|
+
|
|
265
|
+
```ruby
|
|
266
|
+
ActiveAdmin.register Post do
|
|
267
|
+
scope_to :current_user # limits the accessible posts to `current_user.posts`
|
|
268
|
+
|
|
269
|
+
# Or if the association doesn't have the default name:
|
|
270
|
+
scope_to :current_user, association_method: :blog_posts
|
|
271
|
+
|
|
272
|
+
# Finally, you can pass a block to be called:
|
|
273
|
+
scope_to do
|
|
274
|
+
User.most_popular_posts
|
|
275
|
+
end
|
|
276
|
+
end
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
You can also conditionally apply the scope:
|
|
280
|
+
|
|
281
|
+
```ruby
|
|
282
|
+
ActiveAdmin.register Post do
|
|
283
|
+
scope_to :current_user, if: proc{ current_user.limited_access? }
|
|
284
|
+
scope_to :current_user, unless: proc{ current_user.admin? }
|
|
285
|
+
end
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
## Eager loading
|
|
289
|
+
|
|
290
|
+
A common way to increase page performance is to elimate N+1 queries by eager loading associations:
|
|
291
|
+
|
|
292
|
+
```ruby
|
|
293
|
+
ActiveAdmin.register Post do
|
|
294
|
+
includes :author, :categories
|
|
295
|
+
end
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
## Customizing resource retrieval
|
|
299
|
+
|
|
300
|
+
If you need to customize the collection properties, you can overwrite the `scoped_collection` method.
|
|
301
|
+
|
|
302
|
+
```ruby
|
|
303
|
+
ActiveAdmin.register Post do
|
|
304
|
+
controller do
|
|
305
|
+
def scoped_collection
|
|
306
|
+
end_of_association_chain.where(visibility: true)
|
|
307
|
+
end
|
|
308
|
+
end
|
|
309
|
+
end
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
If you need to completely replace the record retrieving code (e.g., you have a custom
|
|
313
|
+
`to_param` implementation in your models), override the `resource` method on the controller:
|
|
314
|
+
|
|
315
|
+
```ruby
|
|
316
|
+
ActiveAdmin.register Post do
|
|
317
|
+
controller do
|
|
318
|
+
def find_resource
|
|
319
|
+
Post.where(id: params[:id]).first!
|
|
320
|
+
end
|
|
321
|
+
end
|
|
322
|
+
end
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
Our controllers are built on [Inherited Resources](https://github.com/josevalim/inherited_resources),
|
|
326
|
+
so you can use [all of its features](https://github.com/josevalim/inherited_resources#overwriting-defaults).
|
|
327
|
+
|
|
328
|
+
## Belongs To
|
|
329
|
+
|
|
330
|
+
It's common to want to scope a series of resources to a relationship. For
|
|
331
|
+
example a Project may have many Milestones and Tickets. To nest the resource
|
|
332
|
+
within another, you can use the `belongs_to` method:
|
|
333
|
+
|
|
334
|
+
```ruby
|
|
335
|
+
ActiveAdmin.register Project
|
|
336
|
+
ActiveAdmin.register Ticket do
|
|
337
|
+
belongs_to :project
|
|
338
|
+
end
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
Projects will be available as usual and tickets will be available by visiting
|
|
342
|
+
`/admin/projects/1/tickets` assuming that a Project with the id of 1 exists.
|
|
343
|
+
Active Admin does not add "Tickets" to the global navigation because the routes
|
|
344
|
+
can only be generated when there is a project id.
|
|
345
|
+
|
|
346
|
+
To create links to the resource, you can add them to a sidebar (one of the many
|
|
347
|
+
possibilities for how you may with to handle your user interface):
|
|
348
|
+
|
|
349
|
+
```ruby
|
|
350
|
+
ActiveAdmin.register Project do
|
|
351
|
+
|
|
352
|
+
sidebar "Project Details", only: [:show, :edit] do
|
|
353
|
+
ul do
|
|
354
|
+
li link_to "Tickets", admin_project_tickets_path(project)
|
|
355
|
+
li link_to "Milestones", admin_project_milestones_path(project)
|
|
356
|
+
end
|
|
357
|
+
end
|
|
358
|
+
end
|
|
359
|
+
|
|
360
|
+
ActiveAdmin.register Ticket do
|
|
361
|
+
belongs_to :project
|
|
362
|
+
end
|
|
363
|
+
|
|
364
|
+
ActiveAdmin.register Milestone do
|
|
365
|
+
belongs_to :project
|
|
366
|
+
end
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
In some cases (like Projects), there are many sub resources and you would
|
|
370
|
+
actually like the global navigation to switch when the user navigates "into" a
|
|
371
|
+
project. To accomplish this, Active Admin stores the `belongs_to` resources in a
|
|
372
|
+
separate menu which you can use if you so wish. To use:
|
|
373
|
+
|
|
374
|
+
```ruby
|
|
375
|
+
ActiveAdmin.register Ticket do
|
|
376
|
+
belongs_to :project
|
|
377
|
+
navigation_menu :project
|
|
378
|
+
end
|
|
379
|
+
|
|
380
|
+
ActiveAdmin.register Milestone do
|
|
381
|
+
belongs_to :project
|
|
382
|
+
navigation_menu :project
|
|
383
|
+
end
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
Now, when you navigate to the tickets section, the global navigation will
|
|
387
|
+
only display "Tickets" and "Milestones". When you navigate back to a
|
|
388
|
+
non-belongs_to resource, it will switch back to the default menu.
|
|
389
|
+
|
|
390
|
+
You can also defer the menu lookup until runtime so that you can dynamically show
|
|
391
|
+
different menus, say perhaps based on user permissions. For example:
|
|
392
|
+
|
|
393
|
+
```ruby
|
|
394
|
+
ActiveAdmin.register Ticket do
|
|
395
|
+
belongs_to :project
|
|
396
|
+
navigation_menu do
|
|
397
|
+
authorized?(:manage, SomeResource) ? :project : :restricted_menu
|
|
398
|
+
end
|
|
399
|
+
end
|
|
400
|
+
```
|
|
401
|
+
|
|
402
|
+
If you still want your `belongs_to` resources to be available in the default menu
|
|
403
|
+
and through non-nested routes, you can use the `:optional` option. For example:
|
|
404
|
+
|
|
405
|
+
```ruby
|
|
406
|
+
ActiveAdmin.register Ticket do
|
|
407
|
+
belongs_to :project, optional: true
|
|
408
|
+
end
|
|
409
|
+
```
|