rails_admin 0.6.0 → 0.6.1
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 +7 -0
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/Gemfile +22 -10
- data/README.md +32 -92
- data/Rakefile +13 -2
- data/app/assets/stylesheets/rails_admin/aristo/jquery-ui-1.8.7.custom.scss +3 -3
- data/app/assets/stylesheets/rails_admin/base/font-awesome-4-compability.scss +153 -58
- data/app/controllers/rails_admin/application_controller.rb +12 -12
- data/app/controllers/rails_admin/main_controller.rb +30 -35
- data/app/helpers/rails_admin/application_helper.rb +37 -40
- data/app/helpers/rails_admin/form_builder.rb +26 -25
- data/app/helpers/rails_admin/main_helper.rb +10 -9
- data/app/views/rails_admin/main/_dashboard_history.html.haml +5 -4
- data/app/views/rails_admin/main/index.html.haml +7 -0
- data/config/initializers/active_record_extensions.rb +3 -3
- data/config/initializers/haml.rb +1 -1
- data/config/routes.rb +7 -7
- data/lib/generators/rails_admin/install_generator.rb +5 -84
- data/lib/generators/rails_admin/templates/initializer.erb +29 -95
- data/lib/generators/rails_admin/utils.rb +3 -14
- data/lib/rails_admin.rb +1 -1
- data/lib/rails_admin/abstract_model.rb +30 -28
- data/lib/rails_admin/adapters/active_record.rb +36 -36
- data/lib/rails_admin/adapters/active_record/abstract_object.rb +2 -2
- data/lib/rails_admin/adapters/mongoid.rb +102 -108
- data/lib/rails_admin/adapters/mongoid/abstract_object.rb +1 -1
- data/lib/rails_admin/adapters/mongoid/extension.rb +5 -5
- data/lib/rails_admin/bootstrap-sass.rb +7 -8
- data/lib/rails_admin/bootstrap-sass/compass_functions.rb +2 -1
- data/lib/rails_admin/config.rb +24 -29
- data/lib/rails_admin/config/actions.rb +12 -15
- data/lib/rails_admin/config/actions/base.rb +8 -8
- data/lib/rails_admin/config/actions/bulk_delete.rb +3 -3
- data/lib/rails_admin/config/actions/dashboard.rb +5 -5
- data/lib/rails_admin/config/actions/delete.rb +4 -4
- data/lib/rails_admin/config/actions/edit.rb +3 -3
- data/lib/rails_admin/config/actions/export.rb +1 -1
- data/lib/rails_admin/config/actions/history_index.rb +1 -1
- data/lib/rails_admin/config/actions/history_show.rb +1 -1
- data/lib/rails_admin/config/actions/index.rb +20 -11
- data/lib/rails_admin/config/actions/new.rb +3 -3
- data/lib/rails_admin/config/actions/show.rb +2 -2
- data/lib/rails_admin/config/actions/show_in_app.rb +1 -1
- data/lib/rails_admin/config/configurable.rb +27 -27
- data/lib/rails_admin/config/fields.rb +7 -7
- data/lib/rails_admin/config/fields/association.rb +6 -7
- data/lib/rails_admin/config/fields/base.rb +32 -30
- data/lib/rails_admin/config/fields/factories/association.rb +9 -10
- data/lib/rails_admin/config/fields/factories/carrierwave.rb +3 -9
- data/lib/rails_admin/config/fields/factories/devise.rb +2 -4
- data/lib/rails_admin/config/fields/factories/dragonfly.rb +3 -5
- data/lib/rails_admin/config/fields/factories/enum.rb +1 -1
- data/lib/rails_admin/config/fields/factories/paperclip.rb +3 -3
- data/lib/rails_admin/config/fields/group.rb +6 -8
- data/lib/rails_admin/config/fields/types.rb +2 -2
- data/lib/rails_admin/config/fields/types/belongs_to_association.rb +4 -4
- data/lib/rails_admin/config/fields/types/boolean.rb +2 -2
- data/lib/rails_admin/config/fields/types/bson_object_id.rb +7 -12
- data/lib/rails_admin/config/fields/types/carrierwave.rb +1 -1
- data/lib/rails_admin/config/fields/types/ck_editor.rb +3 -3
- data/lib/rails_admin/config/fields/types/code_mirror.rb +9 -9
- data/lib/rails_admin/config/fields/types/color.rb +2 -2
- data/lib/rails_admin/config/fields/types/date.rb +2 -2
- data/lib/rails_admin/config/fields/types/datetime.rb +52 -54
- data/lib/rails_admin/config/fields/types/decimal.rb +1 -1
- data/lib/rails_admin/config/fields/types/dragonfly.rb +2 -2
- data/lib/rails_admin/config/fields/types/enum.rb +3 -3
- data/lib/rails_admin/config/fields/types/file_upload.rb +5 -5
- data/lib/rails_admin/config/fields/types/float.rb +1 -1
- data/lib/rails_admin/config/fields/types/has_and_belongs_to_many_association.rb +1 -1
- data/lib/rails_admin/config/fields/types/has_many_association.rb +1 -1
- data/lib/rails_admin/config/fields/types/has_one_association.rb +3 -4
- data/lib/rails_admin/config/fields/types/hidden.rb +1 -1
- data/lib/rails_admin/config/fields/types/integer.rb +1 -1
- data/lib/rails_admin/config/fields/types/paperclip.rb +2 -2
- data/lib/rails_admin/config/fields/types/password.rb +4 -4
- data/lib/rails_admin/config/fields/types/polymorphic_association.rb +8 -11
- data/lib/rails_admin/config/fields/types/serialized.rb +1 -1
- data/lib/rails_admin/config/fields/types/string.rb +5 -6
- data/lib/rails_admin/config/fields/types/text.rb +6 -6
- data/lib/rails_admin/config/fields/types/time.rb +4 -4
- data/lib/rails_admin/config/fields/types/timestamp.rb +1 -1
- data/lib/rails_admin/config/fields/types/wysihtml5.rb +1 -2
- data/lib/rails_admin/config/has_fields.rb +24 -24
- data/lib/rails_admin/config/has_groups.rb +5 -3
- data/lib/rails_admin/config/hideable.rb +2 -2
- data/lib/rails_admin/config/lazy_model.rb +1 -1
- data/lib/rails_admin/config/model.rb +6 -7
- data/lib/rails_admin/config/proxyable/proxy.rb +4 -6
- data/lib/rails_admin/config/sections.rb +1 -3
- data/lib/rails_admin/config/sections/base.rb +1 -1
- data/lib/rails_admin/config/sections/list.rb +4 -0
- data/lib/rails_admin/engine.rb +3 -3
- data/lib/rails_admin/extension.rb +3 -3
- data/lib/rails_admin/extensions/cancan.rb +3 -3
- data/lib/rails_admin/extensions/cancan/authorization_adapter.rb +1 -1
- data/lib/rails_admin/extensions/history.rb +3 -3
- data/lib/rails_admin/extensions/history/auditing_adapter.rb +1 -1
- data/lib/rails_admin/extensions/history/history.rb +12 -11
- data/lib/rails_admin/extensions/paper_trail.rb +3 -3
- data/lib/rails_admin/extensions/paper_trail/auditing_adapter.rb +30 -19
- data/lib/rails_admin/i18n_support.rb +11 -15
- data/lib/rails_admin/support/core_extensions.rb +4 -5
- data/lib/rails_admin/support/csv_converter.rb +21 -23
- data/lib/rails_admin/version.rb +4 -7
- data/lib/rails_admin/version.rbc +582 -0
- data/lib/tasks/rails_admin.rake +0 -12
- data/spec/controllers/rails_admin/application_controller_spec.rb +12 -12
- data/spec/controllers/rails_admin/main_controller_spec.rb +127 -131
- data/spec/dummy_app/Gemfile +12 -6
- data/spec/dummy_app/Gemfile.lock +276 -47
- data/spec/dummy_app/app/active_record/abstract.rb +0 -2
- data/spec/dummy_app/app/active_record/another_field_test.rb +1 -1
- data/spec/dummy_app/app/active_record/ball.rb +2 -2
- data/spec/dummy_app/app/active_record/carrierwave_uploader.rb +1 -3
- data/spec/dummy_app/app/active_record/category.rb +1 -1
- data/spec/dummy_app/app/active_record/cms/basic_page.rb +1 -1
- data/spec/dummy_app/app/active_record/comment.rb +1 -1
- data/spec/dummy_app/app/active_record/comment/confirmed.rb +1 -1
- data/spec/dummy_app/app/active_record/division.rb +2 -2
- data/spec/dummy_app/app/active_record/draft.rb +5 -5
- data/spec/dummy_app/app/active_record/field_test.rb +6 -6
- data/spec/dummy_app/app/active_record/image.rb +1 -1
- data/spec/dummy_app/app/active_record/league.rb +3 -3
- data/spec/dummy_app/app/active_record/nested_field_test.rb +4 -4
- data/spec/dummy_app/app/active_record/player.rb +7 -7
- data/spec/dummy_app/app/active_record/team.rb +12 -9
- data/spec/dummy_app/app/active_record/user.rb +2 -2
- data/spec/dummy_app/app/mongoid/another_field_test.rb +1 -1
- data/spec/dummy_app/app/mongoid/ball.rb +3 -3
- data/spec/dummy_app/app/mongoid/carrierwave_uploader.rb +1 -3
- data/spec/dummy_app/app/mongoid/category.rb +1 -1
- data/spec/dummy_app/app/mongoid/cms/basic_page.rb +3 -3
- data/spec/dummy_app/app/mongoid/comment.rb +2 -2
- data/spec/dummy_app/app/mongoid/comment/confirmed.rb +1 -1
- data/spec/dummy_app/app/mongoid/division.rb +2 -2
- data/spec/dummy_app/app/mongoid/draft.rb +11 -11
- data/spec/dummy_app/app/mongoid/embed.rb +1 -1
- data/spec/dummy_app/app/mongoid/fan.rb +1 -1
- data/spec/dummy_app/app/mongoid/field_test.rb +35 -35
- data/spec/dummy_app/app/mongoid/image.rb +1 -1
- data/spec/dummy_app/app/mongoid/league.rb +3 -3
- data/spec/dummy_app/app/mongoid/nested_field_test.rb +5 -5
- data/spec/dummy_app/app/mongoid/player.rb +17 -17
- data/spec/dummy_app/app/mongoid/team.rb +28 -24
- data/spec/dummy_app/app/mongoid/user.rb +13 -13
- data/spec/dummy_app/config/application.rb +5 -5
- data/spec/dummy_app/config/boot.rb +1 -3
- data/spec/dummy_app/config/environments/test.rb +1 -1
- data/spec/dummy_app/config/initializers/devise.rb +2 -2
- data/spec/dummy_app/config/initializers/session_patch.rb +1 -2
- data/spec/dummy_app/config/initializers/session_store.rb +1 -1
- data/spec/dummy_app/config/initializers/wrap_parameters.rb +1 -1
- data/spec/dummy_app/config/routes.rb +2 -2
- data/spec/dummy_app/db/development.sqlite3 +0 -0
- data/spec/dummy_app/db/migrate/00000000000001_create_divisions_migration.rb +1 -1
- data/spec/dummy_app/db/migrate/00000000000002_create_drafts_migration.rb +1 -1
- data/spec/dummy_app/db/migrate/00000000000003_create_leagues_migration.rb +1 -1
- data/spec/dummy_app/db/migrate/00000000000004_create_players_migration.rb +5 -5
- data/spec/dummy_app/db/migrate/00000000000005_create_teams_migration.rb +5 -5
- data/spec/dummy_app/db/migrate/00000000000006_devise_create_users.rb +5 -5
- data/spec/dummy_app/db/migrate/00000000000007_create_histories_table.rb +7 -7
- data/spec/dummy_app/db/migrate/00000000000008_create_fans_migration.rb +1 -1
- data/spec/dummy_app/db/migrate/00000000000009_create_fans_teams_migration.rb +1 -1
- data/spec/dummy_app/db/migrate/00000000000010_add_revenue_to_team_migration.rb +1 -1
- data/spec/dummy_app/db/migrate/00000000000011_add_suspended_to_player_migration.rb +1 -1
- data/spec/dummy_app/db/migrate/00000000000012_add_avatar_columns_to_user.rb +0 -1
- data/spec/dummy_app/db/migrate/20101223222233_create_rel_tests.rb +1 -1
- data/spec/dummy_app/db/migrate/20110714095433_create_balls.rb +1 -1
- data/spec/dummy_app/db/migrate/20110901131551_change_division_primary_key.rb +3 -3
- data/spec/dummy_app/db/migrate/20110901150912_set_primary_key_not_null_for_divisions.rb +4 -5
- data/spec/dummy_app/db/migrate/20120319041705_drop_rel_tests.rb +1 -1
- data/spec/dummy_app/db/schema.rb +197 -0
- data/spec/dummy_app/db/seeds.rb +9 -9
- data/spec/dummy_app/db/test.sqlite3 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sass/{46504e29e25493e203f6e081863c6f722ba34fce → 0e28199903adc18ba5ed7000a3cfbe6be324f02c}/mixins.scssc +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sass/{46504e29e25493e203f6e081863c6f722ba34fce → 0e28199903adc18ba5ed7000a3cfbe6be324f02c}/theming.scssc +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sass/{46504e29e25493e203f6e081863c6f722ba34fce → 0e28199903adc18ba5ed7000a3cfbe6be324f02c}/variables.scssc +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sass/66bb15d356a3ae9531c123a31be7776c5874ac21/font-awesome.css.erbc +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sass/7a85589b70ac6319b07ac05552a98bba4b834a39/font-awesome-4-compability.scssc +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sass/{245c4be20f01db9121b0992275b77e082f23d7df → 7a85589b70ac6319b07ac05552a98bba4b834a39}/mixins.scssc +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sass/{245c4be20f01db9121b0992275b77e082f23d7df → 7a85589b70ac6319b07ac05552a98bba4b834a39}/theming.scssc +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sass/{245c4be20f01db9121b0992275b77e082f23d7df → 7a85589b70ac6319b07ac05552a98bba4b834a39}/variables.scssc +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sass/{ebde8a6cd2923d8c583ca746dd952b4fe080c2a1 → 92899d6fb50bc282d329302d61a5c00fa959d762}/jquery-ui-1.8.7.custom.scssc +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sass/{c7aba53479ebd90acc5f6ba8fb7463fa43b1ae1c → 977fdcd1d57ae400c0a80cee764210478c5780f6}/jquery.colorpicker.scssc +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sass/{c7aba53479ebd90acc5f6ba8fb7463fa43b1ae1c → 977fdcd1d57ae400c0a80cee764210478c5780f6}/jquery.ui.timepicker.scssc +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sass/{c7aba53479ebd90acc5f6ba8fb7463fa43b1ae1c → 977fdcd1d57ae400c0a80cee764210478c5780f6}/ra.calendar-additions.scssc +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sass/{c7aba53479ebd90acc5f6ba8fb7463fa43b1ae1c → 977fdcd1d57ae400c0a80cee764210478c5780f6}/ra.filtering-multiselect.scssc +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sass/{c7aba53479ebd90acc5f6ba8fb7463fa43b1ae1c → 977fdcd1d57ae400c0a80cee764210478c5780f6}/ra.widgets.scssc +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sass/{c7aba53479ebd90acc5f6ba8fb7463fa43b1ae1c → 977fdcd1d57ae400c0a80cee764210478c5780f6}/rails_admin.scss.erbc +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sass/{a65ba3e01aefad1ad59b6317cbb14d0560ca012b → 9a24497045e3375a0450bb40eb1ffe1eb56bc709}/mixins.scssc +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sass/{a65ba3e01aefad1ad59b6317cbb14d0560ca012b → 9a24497045e3375a0450bb40eb1ffe1eb56bc709}/theming.scssc +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sass/{a65ba3e01aefad1ad59b6317cbb14d0560ca012b → 9a24497045e3375a0450bb40eb1ffe1eb56bc709}/variables.scssc +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_accordion.scssc +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_alerts.scssc +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_breadcrumbs.scssc +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_button-groups.scssc +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_buttons.scssc +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_carousel.scssc +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_close.scssc +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_component-animations.scssc +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_dropdowns.scssc +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_forms.scssc +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_grid.scssc +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_hero-unit.scssc +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_labels-badges.scssc +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_layouts.scssc +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_mixins.scssc +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_modals.scssc +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_navbar.scssc +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_navs.scssc +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_pager.scssc +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_pagination.scssc +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_popovers.scssc +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_progress-bars.scssc +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_reset.scssc +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_scaffolding.scssc +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_tables.scssc +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_thumbnails.scssc +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_tooltip.scssc +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_type.scssc +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_utilities.scssc +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_variables.scssc +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sass/{c996a898a33b80a44fab822802e73b6e409755d2 → a011cf534fa35e4fa0708adf6019078657586c2c}/_wells.scssc +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{d1c2c3a2df8517e019edf30db44566b4 → 021e87bfe65a024a849db3c621f39607} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/02da6cc33425a1387089c6030cf514db +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{4863c57f6c9bbf8cf392ba250f7e8e99 → 04880af615c5763f7808495d1676565b} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/0599094d22f449fecdbc1ae48e3d901e +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{5c75555dac51f16619f3630fc4ce7811 → 06065efe9216af455ca5ae63b780842a} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{fb0757f81f5726edb2a3fecb73c190ac → 07f7c76677c34256252f23976ce6c2a1} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/0843377cd450cc8688003ba317723fae +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/0a4355e8cc379590a5aaf8542419d306 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/0b35ad462ccf12ca91cff9c51164c5a0 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/0f04a8cf5d989e555542213f5b5db676 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{129530d9cbfe95daa40fefb31b541d13 → 1252be603446e6064e85dae1533eaa59} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/12b2ef118f691f66646eac032f7535d3 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/136f479ebd2eedeb83550b4a882538e5 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/1381657fbbc4cc175ae0406c8cbdd852 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/161f8f439887fb5926b02a917b2fab29 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/1b26b92ae53bdc1e9f8a5afa7b72b381 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/1befe9a4bb03dc468cd7f5e7148a6a52 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/1d12409a91dcc8c8a4965c52a7f6b099 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/1db0d2a002e581a113a91a6e93e5d4e7 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{10c9ca24ee38f89898883cf73e22a947 → 1dd74057b76db8f42e06cbb888f14956} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{996f66db546cbb0e74c8e1b206934a8b → 1e7b3532f20949a13b8b69d2dddc559a} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/2051323c87c06ef9fb769ff13afe1d46 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{714f390b93b33846a6c8358e3fb0555e → 2197e41c9dda6c82b109eaa0d5adaf2f} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{cde5d358d89af1813033adcf5abdc012 → 22003805d8abcf11f0649bff9cef6c35} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/258dbc982e14f78732a377754ed23a4b +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/26489e402a71f43f962d6055e30787d0 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{969c58767a7de67e78f9ea69195183d9 → 276e2819a676347a7de259b70679adb8} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/2894746ab7d895286c1b09e42fc94281 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{2ab4ad958f77a3629fb62246f5604bce → 28c0c99cd6d41ead252f979cef74c6c5} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{095e7d24e036c328ff8a353b062c075e → 2943f3fe07d2ae0184c2282647d5c50e} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{a03d8b8153d1a1abc2abf53568d4dad0 → 2a421ff8fbf280e0d7323f26d2656144} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{d35f06fe57bd03bea2483b5398b2c6f8 → 2f23e3869b68c4c9492f9497b288f6bb} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{9011102569db38052e6353455fac950e → 30539f6bae0581cb548f51ee6d9d5b9b} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{2656c3bece9f7e34887e2fceded0784e → 318296efd3e38c26a302d99d1638e4ad} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/31bfcc7896d47062b682cb7305aa9052 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/346057a4a317d5399f0faa78baf2be98 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{0ed0d802514844bf10f8361f431c8cc8 → 374aecf6aa1d05dd23ce4881c1bdd71b} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{76c588a87498d0a7b9c4b93f78c47965 → 382ebccfe8b6bce742f4a2bc0c109d0f} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{9ba5c2b7b2f656550a0deffc19472e39 → 39792f57ea45373a09c7ac823905cb29} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{e647f039e5c667d1ca130f914fb70624 → 3a3728ebf0994eb3f68ac9acf74c5904} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{5395b275597f09db5cc276d8a35b1c9b → 3aaf980536f44c31d1d0145ba8f1721d} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{460d342022e00bbd6edff25125a60ab1 → 3ba808481868b8a56fdf9f106eeda367} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/44e79847ae7bb5c853dbfefa452355f0 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/459777cb1d30f6467da8dd53d9841bee +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/46842ce793ce3da43a6c21ef0c0e745e +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/4764b71e86b2ebfa988853e0ce3bb441 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/4821eb4277ad6a0983c16630cd5806ae +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{375cc143f1184d76e6b3ff0dfb60187c → 485a6b0358511c73965a851ba5569014} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{ba4f88faafacc90d28bc5a92032f2608 → 49ccc514fe103c24a38f100cecb21be9} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{b8e717c8deb6edc80a7a690369d13d35 → 49de4f401551329c23b46284313de8d1} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{c61f7caef6bb75b1c15bde82e7cbbee2 → 4f3e6b4e40b631d3d949509f32ea9bc3} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{5de4f3048b6d83b2236bfbc041ad8f11 → 4fb06529e2126644ddf41924f5be2880} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/4fbd3f63d231f5b25d1b8eb02ecdd150 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/4ffa898a34dcdcfb92898d913da3f720 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/5159e29eea352859ecad8605385bc97e +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{498ee0d8892d5d9be8a37030e3253e14 → 529d621e1fb6b730d9d035b143e93f69} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/54c3d5d9311b5d421c51b5d473de5b05 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/582efaa561d6a724a7cd82b2023e8e29 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{b7ffc32371aea730fc8e27be3be8e633 → 59c191aebff69f4e76cb50860ff17df5} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/5a0024fd5a8ae8322b07acc733c6caed +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/5a8fc55cb58b423142d530fc066dd3a4 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/5b1732a4f9d541544d84a04dda73e752 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/5c8e7da8dcddc72d152039cec5b173c9 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/5e2e774a2e56e0db0d18d782bbcb9639 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{6eff33b3b8fa010e960659ed61b250e6 → 5e9526449d8415fba07fb15676ccea95} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{63ff3018e663064066c3dae6658c36fc → 5eed513a4451dedcc36ec16c45745bd4} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/5fab61053117e1d102e0a355e4b870d3 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{8cfd86644ffefe11ed4880518435c8a5 → 62313843f7d1e2195eca82386ddbafc4} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{6e2e2c829c91d3d0c079771ed77e6654 → 638b254892f40165bda0c1ee6f62a6d6} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{540da504e121104c4de8155ec685b4ea → 660d820d7f5e69fe59c0a7f01aaef8c6} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/69f59cfc7f92e5d7ebf02df73928083b +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/6a09089b5590cbb5dbccba9199b1aa0e +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/6ab99dcd31d6d0380c0df7baa42a2b18 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/6b3e9ff481b3a040acb4e1ea61e4c8fc +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/6ce0b5fdde88a0e3ff318a0c2726d46f +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/6d278334e72b135765a41e991bec0500 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{e13a9d14cda66ff1562d59bae5bb0009 → 6f70cf17d6c5ba22b8afddd7d39c4d70} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{743e275172178779f8b1f7fbe08dd5ea → 729b76b484c9c4df3af759a93635b21d} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/72d8ec2796504cc9604b01118b806cd8 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/74b195601a5c6c8bf93e5e7e9e6da12b +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{2d1df5e32a061a951d5a2d4d9f6c3d24 → 75c3e223b3986acf0bc6c669d16054b8} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{d4a49843caf12d9a6dc764014f42b895 → 75ed3fc3c431fc2154cdd1f760f3210e} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/7795054eed96c541e38536fa029a42ad +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{2e8383214772b291c87934ed8a84b955 → 77a4a5a208b8121488fd9ef247d67813} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/7ec629ff58b2d1e0dfe7f8c56f2fc5d7 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{b82696d97bda7df1d71f90b91abbbb80 → 840324d228205039aaaafc391c208430} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{7be36e83efedfb86b40e05e2c2e9cacf → 842328de502c909f498ccca706cd47dc} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{5cb7d2cb1418d5831b0b61ca68d18a07 → 8644f94b9a1a902153cd97473ce23266} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{bdf867751d648676e25e36a9435e6b26 → 88f2fbf474d52591035c94b07b696ff9} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{e1bba75ba340cdef270c20efd6f983ac → 89fe3f3e75d5eb4ecb1b836fd792990d} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{a03fc26531eea1055e58e91bd64792b3 → 917c85b2a002bf08c90f4509aba5b538} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{7f5f2d823155f3f1da616e146d540dc1 → 920f17a87bb2678c28568f5e686a4cf1} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/925c3596709eb590d786f15a3cf817bb +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/984e0e653074756d5c241ac3597b68d8 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{7ed06e4bd001b429d263963fbe783f11 → 98a0e68016b3c8f8000d991b1d5bc044} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/9b9810623fa8a8a92e55d065f93340ee +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/9c834e292807614b87fc885949cb12d5 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{aa87eff56d455dae33b13bb129cd4d3f → 9dab4fa8ba5260be660ee06b90e3e847} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/9f60a2e19502e0f9ad7ccffa2da50342 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{d5cb053b401e51026a9c743fc9442a45 → 9f6c080a6bd27db284fbb211f3f44a6c} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/9fb546f0f37deda2fdcfd48930de0f69 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{bb2bc7acd86cbf95e1ca5d978aa3b407 → a0bdc79935fc14ace4c5366e1ba7d527} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/a1f2411c0e3e9a52183b5f0c96fa84c8 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{24dcc2914999ebf715353482d3b22e51 → a41cd406b752008bf3aaeb365d9d5e8b} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{bedffc652989e272a8e2774aab019da5 → a50199939a6040343c5487c1dde55260} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/a80f3bf6075735abb8874bf40ca7a4cd +0 -0
- data/spec/dummy_app/tmp/{dragonfly/cache/body/20/4b9c4f1d960805e206c28eac62367b6970f63b → cache/assets/test/sprockets/ad452a261b3fc90b3aca85ffc630817d} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{38fd3d9139702eff7281ee67b638d92e → b0b910efc00aa49d187637e761ea0654} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{0c78a1295e80206cd724fb0661c58ee4 → b12de6d4d7f222f76b111c25f5dab178} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/b1d340312b1b800c7c5e652e1db6c9cc +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/b31203d66a43ee74d976dc763f42f38a +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{20967f4e0f44fccf2c2de06aad218647 → b944bc4b0799f7954005e8b1a5336687} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{f8d79539ba48d44d737f7ca1295354f7 → baf1f20ee8ed55082855f5ecfbb9db4e} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/bf1fd5d742a16de894278017732d1b2c +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/bffa7d2c518d584c3f1ba8b9e11cf745 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{0f72b417ab87169150cd61260cc18f4e → c2f1cee7fb8eb8492c4084ce00dc53b6} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/c53a5fc1810ee9b6c3c933fd5590228e +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/c801ebd7cabbdbe237c427692b2f6017 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{98c978063ce9eca4f00d35e8ee8ccccb → c87758b6b5f54876dccc4562ebd59a43} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/cb1a9d6c11a7eb5430d3c79838a53eb1 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/cb1d6fcc9bad898327636cf414f73b57 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/cd8be896a3bf8f11cc61e0fb6b90eb80 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{550d461012567dbfec3138e404c434e3 → ce027086e6de68f182037504b6227485} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/ce9ba680277b6a7f2f6c65c077e83384 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{d4d934ea7bb7519042bc79deb3028314 → cf435b3d4a48bc16f5cc1db8f7049596} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{672892e6983bdb28969d20d688b445c3 → d024b2e0207c1a894ac2fc0c0e002033} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{6983eaa0179424c5a469abec763c7433 → d1b6047944a0a6e232951727bba44560} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{306d8bf77dac0876fb62a6d7d7279f8b → d2acbd849a5e6d1809ac9e9639dbc893} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/d3e77ae2b265a7b6a4e6619ae888c02f +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{55b24a753c1452383f987ea056096fc8 → d43f3b9f17586aa28c6097e3be02822f} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/d533eddb21cd722c5216bc0bb88f1c6d +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/d6205326f914ac8b2f61b0fefad24ef1 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{1ef09ffd0e1376aabbac9def4652b166 → d79f4cb89c0bf1ea5e42bfda6e6b27c5} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{b68666c0d1bd7d3d06bacd7767043149 → d917eb39b30dcf6725854039c98a5012} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{3a6a4e5299d2063b2dd6e980fa0551d5 → de1a47afa53c502369479e8dbbfebd9b} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{e7da37b727b2c61d4f654f88ebda783d → dee3a9569b9ee7368f88a014ba475c3a} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/e1309c718c63004add03fd7c472ec5c1 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{d4de3cd17da73d9e0d3c4ff1142385c3 → e3e93c085f3fc84da01f92b8d61981ae} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/e5ce6cd41375d04320a8a3150db827a3 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{8864a718fb2c0b6c297e9efbd210e1f5 → e613b18c9e1811582dc0aeaf095e56ae} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{c242b461c1c4aa60e2dfa5486dc9a1a8 → e69a4b84ef07dbc0ac277803d272a6fa} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{d104a4ce0d9dc0398049425d45fd6e47 → e72ab273009021b9a7b5770457a9d13b} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{2998aba256780a65cc4058fdd00f3b8f → ebf2567e766b39401f690380a2d00e66} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/ec99299f858e97986ac4ba883d94826c +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/ecddf8ef16cc19c9634433c4f5dcc256 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{2e96c0383b32e1ec0746b08f3bea0c7b → eefb724057cd7d3f1e6fee605910718d} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{51173669b5ab5031ba6c9eff069b6ae7 → f1f9a7b96317af0df54445979f298b68} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/f342ebdd61bbcd9b91b4d09aac84b7e6 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{d778ac3298efe5fc7d13405e66041015 → f37153d14eee1485b7d6bb7bd5196af6} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/f3ad8cf21b94a7a5f382482e0529fe3c +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{1c166333b9ae232ca3c43174ff7ed396 → f4f596c9ba337be0d71e4ef01d05e45c} +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/{b1f49e09b0df0a360d041969f76da859 → fe334a948fd2e5baccfa25d2c4abffc4} +0 -0
- data/spec/dummy_app/tmp/dragonfly/cache/body/3e/2e27ad204d468500de8d9902b63d1e88657389 +4 -0
- data/spec/dummy_app/tmp/{cache/assets/test/sprockets/b1b5c83a14fd8b2081cbb32dd26021c4 → dragonfly/cache/body/6f/58795de38055147320844c9fa5ff32e0aa123e} +0 -0
- data/spec/dummy_app/tmp/dragonfly/cache/meta/1c/caf9bcaeb88256d4e9505faaa85621e4b53a8d +0 -0
- data/spec/dummy_app/tmp/dragonfly/cache/meta/25/1c81c04032b247ef575f4c929301f7f1963a39 +0 -0
- data/spec/dummy_app/tmp/dragonfly/cache/meta/2b/b5469f96538f0f47bb9c2828b5f970fae89a8d +0 -0
- data/spec/dummy_app/tmp/dragonfly/cache/meta/2e/276270b8e924ea3de50db2ad7a265c3bc4f0a1 +0 -0
- data/spec/dummy_app/tmp/dragonfly/cache/meta/62/36dfc092f525f643ded34bb316308d788f8f41 +0 -0
- data/spec/dummy_app/tmp/dragonfly/cache/meta/70/d58ddc461366882590f97c0d9ea3af5545b5a1 +0 -0
- data/spec/dummy_app/tmp/dragonfly/cache/meta/bd/bb171fbf5c5c34eff7efc8fa78817acc7dea9d +0 -0
- data/spec/dummy_app/tmp/dragonfly/cache/meta/d1/6c9c5ef0b7ae606b4a12cb7daf2fa7dc21acd5 +0 -0
- data/spec/factories.rb +2 -3
- data/spec/helpers/rails_admin/application_helper_spec.rb +86 -86
- data/spec/helpers/rails_admin/form_builder_spec.rb +6 -6
- data/spec/integration/authorization/cancan_spec.rb +168 -173
- data/spec/integration/basic/bulk_action/rails_admin_basic_bulk_action_spec.rb +11 -11
- data/spec/integration/basic/bulk_destroy/rails_admin_basic_bulk_destroy_spec.rb +16 -16
- data/spec/integration/basic/create/rails_admin_basic_create_spec.rb +69 -69
- data/spec/integration/basic/create/rails_admin_namespaced_model_create_spec.rb +8 -8
- data/spec/integration/basic/delete/rails_admin_basic_delete_spec.rb +21 -21
- data/spec/integration/basic/destroy/rails_admin_basic_destroy_spec.rb +32 -32
- data/spec/integration/basic/edit/rails_admin_basic_edit_spec.rb +39 -39
- data/spec/integration/basic/export/rails_admin_basic_export_spec.rb +36 -36
- data/spec/integration/basic/list/rails_admin_basic_list_spec.rb +194 -102
- data/spec/integration/basic/new/rails_admin_basic_new_spec.rb +30 -30
- data/spec/integration/basic/new/rails_admin_namespaced_model_new_spec.rb +12 -12
- data/spec/integration/basic/show/rails_admin_basic_show_spec.rb +34 -34
- data/spec/integration/basic/update/rails_admin_basic_update_spec.rb +90 -90
- data/spec/integration/config/edit/rails_admin_config_edit_spec.rb +351 -352
- data/spec/integration/config/list/rails_admin_config_list_spec.rb +132 -133
- data/spec/integration/config/show/rails_admin_config_show_spec.rb +82 -83
- data/spec/integration/history/rails_admin_history_spec.rb +15 -15
- data/spec/integration/rails_admin_spec.rb +48 -49
- data/spec/integration/relation_spec.rb +12 -12
- data/spec/orm/active_record.rb +7 -4
- data/spec/orm/mongoid.rb +1 -7
- data/spec/rails_admin/abstract_model_spec.rb +28 -28
- data/spec/rails_admin/active_record_extension_spec.rb +3 -3
- data/spec/rails_admin/adapters/active_record/abstract_object_spec.rb +29 -29
- data/spec/rails_admin/adapters/active_record_spec.rb +210 -215
- data/spec/rails_admin/adapters/mongoid/abstract_object_spec.rb +19 -19
- data/spec/rails_admin/adapters/mongoid_spec.rb +429 -435
- data/spec/rails_admin/config/actions/base_spec.rb +9 -9
- data/spec/rails_admin/config/actions_spec.rb +42 -42
- data/spec/rails_admin/config/fields/base_spec.rb +135 -136
- data/spec/rails_admin/config/fields/date_spec.rb +17 -17
- data/spec/rails_admin/config/fields/datetime_spec.rb +12 -13
- data/spec/rails_admin/config/fields/file_upload_spec.rb +4 -5
- data/spec/rails_admin/config/fields/time_spec.rb +12 -13
- data/spec/rails_admin/config/fields/timestamp_spec.rb +5 -5
- data/spec/rails_admin/config/fields/types/ck_editor_spec.rb +1 -1
- data/spec/rails_admin/config/fields/types/datetime_spec.rb +2 -2
- data/spec/rails_admin/config/fields_spec.rb +4 -4
- data/spec/rails_admin/config/has_fields_spec.rb +4 -4
- data/spec/rails_admin/config/lazy_model_spec.rb +5 -5
- data/spec/rails_admin/config/model_spec.rb +50 -50
- data/spec/rails_admin/config/proxyable/proxy_spec.rb +7 -10
- data/spec/rails_admin/config/sections_spec.rb +22 -22
- data/spec/rails_admin/config_spec.rb +81 -80
- data/spec/rails_admin/support/csv_converter_spec.rb +3 -3
- data/spec/spec_helper.rb +11 -14
- metadata +509 -548
- metadata.gz.sig +0 -0
- data/lib/generators/rails_admin/templates/drop.rb +0 -18
- data/lib/generators/rails_admin/templates/migration.rb +0 -18
- data/lib/generators/rails_admin/uninstall_generator.rb +0 -22
- data/spec/dummy_app/tmp/cache/assets/test/sass/245c4be20f01db9121b0992275b77e082f23d7df/font-awesome-4-compability.scssc +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sass/ec09962bad77c2bf0bbd3ac3d62b1dd18394a9fe/font-awesome.css.erbc +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/0166686128d421b993db59eb5e22c92c +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/03c695c9019f09cbb02f63a7ae21d79f +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/09f8aac43754fe92352c1a0dac795897 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/0ae5c9a0fc0ac395440fd4a9475ad717 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/11f4d136083919b98336de97c5a27364 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/128dcffe5acb878aaf10cb69ede11e54 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/143fa89e22fd0f160912728242c12d20 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/174a5ce6774da56e0d025f915d2a5656 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/1e909aba91e1216beb4533895a4a6ffa +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/21af0c9472c74ff4307411a74eb52a08 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/232be00ca912eb52d6fc11676eee2f52 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/245b58f60816ff2e286784b47a8124a6 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/24df57fbd4ef4a5d613ab3360a611f9d +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/26495c65c6a62b71419149d7dd3b601b +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/2d69e41d82df0b55096aed4faa6f16c6 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/2f60f107ce85662c1588f521bb9e2c8b +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/30061ffe89ebc51d869d6b363b18a7cf +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/34ac1a6bcf81e3f9139511c7be3dfed9 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/3c44e3b6e6c89b71c859ee6552fd8abb +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/412440cb48736db6d625f0ecb113344d +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/4557193886d8770d362ce8103d320b9f +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/498f25956085afc83e15c44ffb1170e6 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/57dc08580327982fc6a9e8c0a7f168ad +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/5a6cbfd514173d817be78f9d005c5680 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/5e2c9668e1a6c05d64b5c7cd79ddd647 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/64277385d99fc22b7ff9fa9cacc0dc93 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/66c9b69b948666df4d011498e6631eed +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/696be962f98b08b9fee127ddd7e99903 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/69d2c687f9659c7d6fb668bddb032834 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/6bd55d53bef2f0dd81671f0f02f7d3ed +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/70b145271cbc457a0b6fd0c63af2983f +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/73f41636108e88974107e84d4d50801d +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/75f716413cdabd240c8b85adc42ddad9 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/7741691076a9f393f20d291004464ac0 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/785ad3ea421e6a5227ad573a68eb210e +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/7a9b30ad67a8c153e95d638e962bf463 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/7aa93b56c89c66301f9154d27ea9014f +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/7c081ddde599ff1c2e0006defac49285 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/7ef92f534d8e2b3abde760d1813145d9 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/82d50803717341c893f612a86d9a1400 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/8626144fc98fb2a6c7ede9bf55f84cac +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/898f5214bcdb21409c81c8aade73b535 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/8f5d6d8fba731caff3f9e84487876612 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/91c2a4d8729e7c56e56029d18edb1176 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/99e5beb37b7130f59a12936b6b763447 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/9ad9a36052fd8184d3634f8edbf52a68 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/a70e63d06a6899f97de5cf676b2c395c +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/b1b02c2fe88268d3d00709aeca4c2eb5 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/b95121cacfdf3b3cd1197526fbc6c098 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/bab598b96111d2c4545459320f65853b +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/bbc9f2cbbd599b8b17e585cd2ebfc9a2 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/c1bbc7c7493a2006f9116a79be4aad50 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/c3381e393b50c9df2f8b97e4634b1349 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/c402e3bddd9e25c23e52df17c8bb42a3 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/c7222887ab4570345607228eed54b7c4 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/d4e4ebef5c7337c61bee8cc343e473d4 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/d5150138d2eedf2573c71dbd75180e2a +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/dbeda8fff4e9b5084fd1bc79a0f220d0 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/e43b6fc5e743fc33b6ec77b00fc1c916 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/ec6a90e298605bce56e3e47e1c4a6d5c +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/ef41f276ef9b69b0d57e4566493cc15d +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/efba5ca5522c353d79d1b624f22179c1 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/f304c66c0c0e65597b8a53e4b9883357 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/f386bc0d31bc15498eaff65440bf1ead +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/f9c9bd4d84f1951260e50180fa8ae0d2 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/fa6cff1eeaad0d65a825b3ebd3045070 +0 -0
- data/spec/dummy_app/tmp/cache/assets/test/sprockets/fead2dec6a8d5e520cd797810ef316bd +0 -0
- data/spec/dummy_app/tmp/dragonfly/cache/body/d9/6abc70a2bba359cc1bebcf56d7d4e522eacbad +0 -4
- data/spec/dummy_app/tmp/dragonfly/cache/meta/01/52bba6767d462a8815bfef629b8413079a9d31 +0 -0
- data/spec/dummy_app/tmp/dragonfly/cache/meta/38/703cefed91dd44c4a8fea5cbb4b17e1ebfc99d +0 -0
- data/spec/dummy_app/tmp/dragonfly/cache/meta/40/1d77fa6d5446212f87dac823fbdcb241ec9325 +0 -0
- data/spec/dummy_app/tmp/dragonfly/cache/meta/40/95eda2cf7223fc56a96360973c859a9f24d468 +0 -0
- data/spec/dummy_app/tmp/dragonfly/cache/meta/5b/7f94b5e3c284cefaa1531e7b5c7f20354a6735 +0 -0
- data/spec/dummy_app/tmp/dragonfly/cache/meta/5e/ef47362a4fd7fd0542ff5e873eb5b76d7d5002 +0 -0
- data/spec/dummy_app/tmp/dragonfly/cache/meta/64/5a7c779a6e798b4f85e897f1d39ef331e1678c +0 -0
- data/spec/dummy_app/tmp/dragonfly/cache/meta/67/d60c85f99af4a911cf86702114da2d9fff52ac +0 -0
- data/spec/dummy_app/tmp/dragonfly/cache/meta/82/f18afea133bee8e0c723324497383d7bb510f9 +0 -0
- data/spec/dummy_app/tmp/dragonfly/cache/meta/84/9965055e94a3d5727a725d174bbbed8f8ecce3 +0 -0
- data/spec/dummy_app/tmp/dragonfly/cache/meta/90/acadf04574dc9417c2f7c238ee48e901b92474 +0 -0
- data/spec/dummy_app/tmp/dragonfly/cache/meta/a8/8839a9c373f06becc049eeb4f4cdb194c1ceda +0 -0
- data/spec/dummy_app/tmp/dragonfly/cache/meta/b7/b845f13b154ef49a71b1be96931905695a62fc +0 -0
- data/spec/dummy_app/tmp/dragonfly/cache/meta/ca/9693eea0638512131858fa1fc6c43a76687529 +0 -0
- data/spec/dummy_app/tmp/dragonfly/cache/meta/e7/c486ba5ec259581c09ba1f4ee381c719719397 +0 -0
- data/spec/dummy_app/tmp/dragonfly/cache/meta/f2/220f8edf3a69687421c04f7fc325efd46ca120 +0 -0
|
@@ -2,29 +2,29 @@
|
|
|
2
2
|
|
|
3
3
|
require 'spec_helper'
|
|
4
4
|
|
|
5
|
-
describe
|
|
5
|
+
describe 'RailsAdmin Config DSL Edit Section' do
|
|
6
6
|
|
|
7
7
|
subject { page }
|
|
8
8
|
|
|
9
9
|
describe " a field with 'format' as a name (Kernel function)" do
|
|
10
10
|
|
|
11
|
-
it
|
|
11
|
+
it 'is updatable without any error' do
|
|
12
12
|
RailsAdmin.config FieldTest do
|
|
13
13
|
edit do
|
|
14
14
|
field :format
|
|
15
15
|
end
|
|
16
16
|
end
|
|
17
|
-
visit new_path(:
|
|
18
|
-
fill_in
|
|
19
|
-
click_button
|
|
20
|
-
@record = RailsAdmin::AbstractModel.new(
|
|
21
|
-
expect(@record.format).to eq(
|
|
17
|
+
visit new_path(model_name: 'field_test')
|
|
18
|
+
fill_in 'field_test[format]', with: 'test for format'
|
|
19
|
+
click_button 'Save' # first(:button, "Save").click
|
|
20
|
+
@record = RailsAdmin::AbstractModel.new('FieldTest').first
|
|
21
|
+
expect(@record.format).to eq('test for format')
|
|
22
22
|
end
|
|
23
23
|
end
|
|
24
24
|
|
|
25
|
-
describe
|
|
25
|
+
describe 'default_value' do
|
|
26
26
|
|
|
27
|
-
it
|
|
27
|
+
it 'is set for all types of input fields' do
|
|
28
28
|
RailsAdmin.config do |config|
|
|
29
29
|
config.excluded_models = []
|
|
30
30
|
config.model(FieldTest) do
|
|
@@ -44,7 +44,7 @@ describe "RailsAdmin Config DSL Edit Section" do
|
|
|
44
44
|
end
|
|
45
45
|
end
|
|
46
46
|
|
|
47
|
-
visit new_path(:
|
|
47
|
+
visit new_path(model_name: 'field_test')
|
|
48
48
|
# In Rails 3.2.3 behavior of textarea has changed to insert newline after the opening tag,
|
|
49
49
|
# but Capybara's RackTest driver is not up to this behavior change.
|
|
50
50
|
# (https://github.com/jnicklas/capybara/issues/677)
|
|
@@ -55,89 +55,89 @@ describe "RailsAdmin Config DSL Edit Section" do
|
|
|
55
55
|
expect(has_checked_field?('field_test[boolean_field]')).to be_true
|
|
56
56
|
end
|
|
57
57
|
|
|
58
|
-
it
|
|
58
|
+
it 'sets default value for selects' do
|
|
59
59
|
RailsAdmin.config(Team) do
|
|
60
60
|
field :color, :enum do
|
|
61
61
|
default_value 'black'
|
|
62
62
|
enum do
|
|
63
|
-
|
|
63
|
+
%w(black white)
|
|
64
64
|
end
|
|
65
65
|
end
|
|
66
66
|
end
|
|
67
|
-
visit new_path(:
|
|
67
|
+
visit new_path(model_name: 'team')
|
|
68
68
|
expect(find_field('team[color]').value).to eq('black')
|
|
69
69
|
end
|
|
70
70
|
end
|
|
71
71
|
|
|
72
|
-
describe
|
|
73
|
-
it
|
|
74
|
-
visit new_path(:
|
|
75
|
-
should have_selector(
|
|
72
|
+
describe 'css hooks' do
|
|
73
|
+
it 'is present' do
|
|
74
|
+
visit new_path(model_name: 'team')
|
|
75
|
+
should have_selector('#team_division_id_field.belongs_to_association_type.division_field')
|
|
76
76
|
end
|
|
77
77
|
end
|
|
78
78
|
|
|
79
|
-
describe
|
|
79
|
+
describe 'field groupings' do
|
|
80
80
|
|
|
81
|
-
it
|
|
81
|
+
it 'is hideable' do
|
|
82
82
|
RailsAdmin.config Team do
|
|
83
83
|
edit do
|
|
84
84
|
group :default do
|
|
85
|
-
label
|
|
85
|
+
label 'Hidden group'
|
|
86
86
|
hide
|
|
87
87
|
end
|
|
88
88
|
end
|
|
89
89
|
end
|
|
90
|
-
visit new_path(:
|
|
90
|
+
visit new_path(model_name: 'team')
|
|
91
91
|
# Should not have the group header
|
|
92
|
-
should have_no_selector(
|
|
92
|
+
should have_no_selector('legend', text: 'Hidden Group')
|
|
93
93
|
# Should not have any of the group's fields either
|
|
94
|
-
should have_no_selector(
|
|
95
|
-
should have_no_selector(
|
|
96
|
-
should have_no_selector(
|
|
97
|
-
should have_no_selector(
|
|
98
|
-
should have_no_selector(
|
|
99
|
-
should have_no_selector(
|
|
100
|
-
should have_no_selector(
|
|
101
|
-
should have_no_selector(
|
|
102
|
-
should have_no_selector(
|
|
103
|
-
should have_no_selector(
|
|
104
|
-
should have_no_selector(
|
|
94
|
+
should have_no_selector('select#team_division')
|
|
95
|
+
should have_no_selector('input#team_name')
|
|
96
|
+
should have_no_selector('input#team_logo_url')
|
|
97
|
+
should have_no_selector('input#team_manager')
|
|
98
|
+
should have_no_selector('input#team_ballpark')
|
|
99
|
+
should have_no_selector('input#team_mascot')
|
|
100
|
+
should have_no_selector('input#team_founded')
|
|
101
|
+
should have_no_selector('input#team_wins')
|
|
102
|
+
should have_no_selector('input#team_losses')
|
|
103
|
+
should have_no_selector('input#team_win_percentage')
|
|
104
|
+
should have_no_selector('input#team_revenue')
|
|
105
105
|
end
|
|
106
106
|
|
|
107
|
-
it
|
|
107
|
+
it 'hides association groupings' do
|
|
108
108
|
RailsAdmin.config Team do
|
|
109
109
|
edit do
|
|
110
110
|
group :players do
|
|
111
|
-
label
|
|
111
|
+
label 'Players'
|
|
112
112
|
field :players
|
|
113
113
|
hide
|
|
114
114
|
end
|
|
115
115
|
end
|
|
116
116
|
end
|
|
117
|
-
visit new_path(:
|
|
117
|
+
visit new_path(model_name: 'team')
|
|
118
118
|
# Should not have the group header
|
|
119
|
-
should have_no_selector(
|
|
119
|
+
should have_no_selector('legend', text: 'Players')
|
|
120
120
|
# Should not have any of the group's fields either
|
|
121
|
-
should have_no_selector(
|
|
121
|
+
should have_no_selector('select#team_player_ids')
|
|
122
122
|
end
|
|
123
123
|
|
|
124
|
-
it
|
|
124
|
+
it 'is renameable' do
|
|
125
125
|
RailsAdmin.config Team do
|
|
126
126
|
edit do
|
|
127
127
|
group :default do
|
|
128
|
-
label
|
|
128
|
+
label 'Renamed group'
|
|
129
129
|
end
|
|
130
130
|
end
|
|
131
131
|
end
|
|
132
|
-
visit new_path(:
|
|
132
|
+
visit new_path(model_name: 'team')
|
|
133
133
|
# NOTE: capybara 2.0 is exceedingly reluctant to reveal the text of invisible elements. This was
|
|
134
134
|
# the least terrible option I was able to find. It would probably be better to refactor the test
|
|
135
135
|
# so the label we're looking for is displayed.
|
|
136
|
-
expect(find(
|
|
136
|
+
expect(find('legend', visible: false).native.text).to include('Renamed group')
|
|
137
137
|
end
|
|
138
138
|
|
|
139
|
-
describe
|
|
140
|
-
before
|
|
139
|
+
describe 'help' do
|
|
140
|
+
before do
|
|
141
141
|
class HelpTest < Tableless
|
|
142
142
|
column :name, 'string(50)'
|
|
143
143
|
column :division, :string
|
|
@@ -151,54 +151,54 @@ describe "RailsAdmin Config DSL Edit Section" do
|
|
|
151
151
|
HelpTest.reset_callbacks(:validate)
|
|
152
152
|
end
|
|
153
153
|
|
|
154
|
-
context
|
|
155
|
-
it
|
|
156
|
-
visit new_path(:
|
|
157
|
-
expect(find(
|
|
154
|
+
context 'using mongoid', skip_active_record: true do
|
|
155
|
+
it 'uses the db column size for the maximum length' do
|
|
156
|
+
visit new_path(model_name: 'help_test')
|
|
157
|
+
expect(find('#help_test_name_field .help-block')).to have_content('Length up to 255.')
|
|
158
158
|
end
|
|
159
159
|
|
|
160
|
-
it
|
|
161
|
-
visit new_path(:
|
|
162
|
-
expect(find(
|
|
160
|
+
it 'returns nil for the maximum length' do
|
|
161
|
+
visit new_path(model_name: 'team')
|
|
162
|
+
expect(find('#team_custom_field_field .help-block')).not_to have_content('Length')
|
|
163
163
|
end
|
|
164
164
|
end
|
|
165
165
|
|
|
166
|
-
context
|
|
167
|
-
it
|
|
168
|
-
visit new_path(:
|
|
169
|
-
expect(find(
|
|
166
|
+
context 'using active_record', skip_mongoid: true do
|
|
167
|
+
it 'uses the db column size for the maximum length' do
|
|
168
|
+
visit new_path(model_name: 'help_test')
|
|
169
|
+
expect(find('#help_test_name_field .help-block')).to have_content('Length up to 50.')
|
|
170
170
|
end
|
|
171
171
|
|
|
172
|
-
it
|
|
172
|
+
it 'uses the :minimum setting from the validation' do
|
|
173
173
|
HelpTest.class_eval do
|
|
174
|
-
validates_length_of :name, :
|
|
174
|
+
validates_length_of :name, minimum: 1
|
|
175
175
|
end
|
|
176
|
-
visit new_path(:
|
|
177
|
-
expect(find(
|
|
176
|
+
visit new_path(model_name: 'help_test')
|
|
177
|
+
expect(find('#help_test_name_field .help-block')).to have_content('Length of 1-50.')
|
|
178
178
|
end
|
|
179
179
|
|
|
180
|
-
it
|
|
180
|
+
it 'uses the minimum of db column size or :maximum setting from the validation' do
|
|
181
181
|
HelpTest.class_eval do
|
|
182
|
-
validates_length_of :name, :
|
|
182
|
+
validates_length_of :name, maximum: 51
|
|
183
183
|
end
|
|
184
|
-
visit new_path(:
|
|
185
|
-
expect(find(
|
|
184
|
+
visit new_path(model_name: 'help_test')
|
|
185
|
+
expect(find('#help_test_name_field .help-block')).to have_content('Length up to 50.')
|
|
186
186
|
end
|
|
187
187
|
end
|
|
188
188
|
|
|
189
|
-
it
|
|
189
|
+
it 'shows help section if present' do
|
|
190
190
|
RailsAdmin.config HelpTest do
|
|
191
191
|
edit do
|
|
192
192
|
group :default do
|
|
193
|
-
help
|
|
193
|
+
help 'help paragraph to display'
|
|
194
194
|
end
|
|
195
195
|
end
|
|
196
196
|
end
|
|
197
|
-
visit new_path(:
|
|
198
|
-
should have_selector('fieldset>p', :
|
|
197
|
+
visit new_path(model_name: 'help_test')
|
|
198
|
+
should have_selector('fieldset>p', text: 'help paragraph to display')
|
|
199
199
|
end
|
|
200
200
|
|
|
201
|
-
it
|
|
201
|
+
it 'does not show help if not present' do
|
|
202
202
|
RailsAdmin.config HelpTest do
|
|
203
203
|
edit do
|
|
204
204
|
group :default do
|
|
@@ -206,11 +206,11 @@ describe "RailsAdmin Config DSL Edit Section" do
|
|
|
206
206
|
end
|
|
207
207
|
end
|
|
208
208
|
end
|
|
209
|
-
visit new_path(:
|
|
209
|
+
visit new_path(model_name: 'help_test')
|
|
210
210
|
should_not have_selector('fieldset>p')
|
|
211
211
|
end
|
|
212
212
|
|
|
213
|
-
it
|
|
213
|
+
it 'is able to display multiple help if there are multiple sections' do
|
|
214
214
|
RailsAdmin.config HelpTest do
|
|
215
215
|
edit do
|
|
216
216
|
group :default do
|
|
@@ -218,53 +218,53 @@ describe "RailsAdmin Config DSL Edit Section" do
|
|
|
218
218
|
help 'help for default'
|
|
219
219
|
end
|
|
220
220
|
group :other_section do
|
|
221
|
-
label
|
|
221
|
+
label 'Other Section'
|
|
222
222
|
field :division
|
|
223
223
|
help 'help for other section'
|
|
224
224
|
end
|
|
225
225
|
end
|
|
226
226
|
end
|
|
227
|
-
visit new_path(:
|
|
228
|
-
should have_selector(
|
|
229
|
-
should have_selector(
|
|
230
|
-
should have_selector(
|
|
227
|
+
visit new_path(model_name: 'help_test')
|
|
228
|
+
should have_selector('fieldset>p', text: 'help for default')
|
|
229
|
+
should have_selector('fieldset>p', text: 'help for other section')
|
|
230
|
+
should have_selector('fieldset>p', count: 2)
|
|
231
231
|
end
|
|
232
232
|
|
|
233
|
-
it
|
|
233
|
+
it 'uses the :is setting from the validation' do
|
|
234
234
|
HelpTest.class_eval do
|
|
235
|
-
validates_length_of :name, :
|
|
235
|
+
validates_length_of :name, is: 3
|
|
236
236
|
end
|
|
237
|
-
visit new_path(:
|
|
238
|
-
expect(find(
|
|
237
|
+
visit new_path(model_name: 'help_test')
|
|
238
|
+
expect(find('#help_test_name_field .help-block')).to have_content('Length of 3.')
|
|
239
239
|
end
|
|
240
240
|
|
|
241
|
-
it
|
|
241
|
+
it 'uses the :maximum setting from the validation' do
|
|
242
242
|
HelpTest.class_eval do
|
|
243
|
-
validates_length_of :name, :
|
|
243
|
+
validates_length_of :name, maximum: 49
|
|
244
244
|
end
|
|
245
|
-
visit new_path(:
|
|
246
|
-
expect(find(
|
|
245
|
+
visit new_path(model_name: 'help_test')
|
|
246
|
+
expect(find('#help_test_name_field .help-block')).to have_content('Length up to 49.')
|
|
247
247
|
end
|
|
248
248
|
|
|
249
|
-
it
|
|
249
|
+
it 'uses the :minimum and :maximum from the validation' do
|
|
250
250
|
HelpTest.class_eval do
|
|
251
|
-
validates_length_of :name, :
|
|
251
|
+
validates_length_of :name, minimum: 1, maximum: 49
|
|
252
252
|
end
|
|
253
|
-
visit new_path(:
|
|
254
|
-
expect(find(
|
|
253
|
+
visit new_path(model_name: 'help_test')
|
|
254
|
+
expect(find('#help_test_name_field .help-block')).to have_content('Length of 1-49.')
|
|
255
255
|
end
|
|
256
256
|
|
|
257
|
-
it
|
|
257
|
+
it 'uses the range from the validation' do
|
|
258
258
|
HelpTest.class_eval do
|
|
259
|
-
validates_length_of :name, :
|
|
259
|
+
validates_length_of :name, in: 1..49
|
|
260
260
|
end
|
|
261
|
-
visit new_path(:
|
|
262
|
-
expect(find(
|
|
261
|
+
visit new_path(model_name: 'help_test')
|
|
262
|
+
expect(find('#help_test_name_field .help-block')).to have_content('Length of 1-49.')
|
|
263
263
|
end
|
|
264
264
|
|
|
265
265
|
end
|
|
266
266
|
|
|
267
|
-
it
|
|
267
|
+
it 'has accessor for its fields' do
|
|
268
268
|
RailsAdmin.config Team do
|
|
269
269
|
edit do
|
|
270
270
|
group :default do
|
|
@@ -280,17 +280,17 @@ describe "RailsAdmin Config DSL Edit Section" do
|
|
|
280
280
|
end
|
|
281
281
|
end
|
|
282
282
|
end
|
|
283
|
-
visit new_path(:
|
|
284
|
-
should have_selector(
|
|
285
|
-
should have_selector(
|
|
286
|
-
should have_selector(
|
|
287
|
-
should have_selector(
|
|
288
|
-
should have_selector(
|
|
289
|
-
should have_selector(
|
|
290
|
-
should have_selector(
|
|
283
|
+
visit new_path(model_name: 'team')
|
|
284
|
+
should have_selector('legend', text: 'Basic info', visible: false)
|
|
285
|
+
should have_selector('legend', text: 'Basic info', visible: true)
|
|
286
|
+
should have_selector('legend', text: "Belong's to associations")
|
|
287
|
+
should have_selector('label', text: 'Name')
|
|
288
|
+
should have_selector('label', text: 'Logo url')
|
|
289
|
+
should have_selector('label', text: 'Division')
|
|
290
|
+
should have_selector('.control-group', count: 4)
|
|
291
291
|
end
|
|
292
292
|
|
|
293
|
-
it
|
|
293
|
+
it 'has accessor for its fields by type' do
|
|
294
294
|
RailsAdmin.config Team do
|
|
295
295
|
edit do
|
|
296
296
|
group :default do
|
|
@@ -307,35 +307,35 @@ describe "RailsAdmin Config DSL Edit Section" do
|
|
|
307
307
|
end
|
|
308
308
|
end
|
|
309
309
|
end
|
|
310
|
-
visit new_path(:
|
|
311
|
-
should have_selector(
|
|
312
|
-
should have_selector(
|
|
313
|
-
should have_selector(
|
|
314
|
-
should have_selector(
|
|
315
|
-
should have_selector(
|
|
310
|
+
visit new_path(model_name: 'team')
|
|
311
|
+
should have_selector('label', text: 'Name')
|
|
312
|
+
should have_selector('label', text: 'Logo url')
|
|
313
|
+
should have_selector('label', text: 'Division')
|
|
314
|
+
should have_selector('label', text: 'Manager (STRING)')
|
|
315
|
+
should have_selector('label', text: 'Ballpark (STRING)')
|
|
316
316
|
end
|
|
317
317
|
end
|
|
318
318
|
|
|
319
319
|
describe "items' fields" do
|
|
320
320
|
|
|
321
|
-
it
|
|
322
|
-
visit new_path(:
|
|
323
|
-
should have_selector(
|
|
324
|
-
should have_selector(
|
|
325
|
-
should have_selector(
|
|
326
|
-
should have_selector(
|
|
327
|
-
should have_selector(
|
|
328
|
-
should have_selector(
|
|
329
|
-
should have_selector(
|
|
330
|
-
should have_selector(
|
|
331
|
-
should have_selector(
|
|
332
|
-
should have_selector(
|
|
333
|
-
should have_selector(
|
|
334
|
-
should have_selector(
|
|
335
|
-
should have_selector(
|
|
321
|
+
it 'shows all by default' do
|
|
322
|
+
visit new_path(model_name: 'team')
|
|
323
|
+
should have_selector('select#team_division_id')
|
|
324
|
+
should have_selector('input#team_name')
|
|
325
|
+
should have_selector('input#team_logo_url')
|
|
326
|
+
should have_selector('input#team_manager')
|
|
327
|
+
should have_selector('input#team_ballpark')
|
|
328
|
+
should have_selector('input#team_mascot')
|
|
329
|
+
should have_selector('input#team_founded')
|
|
330
|
+
should have_selector('input#team_wins')
|
|
331
|
+
should have_selector('input#team_losses')
|
|
332
|
+
should have_selector('input#team_win_percentage')
|
|
333
|
+
should have_selector('input#team_revenue')
|
|
334
|
+
should have_selector('select#team_player_ids')
|
|
335
|
+
should have_selector('select#team_fan_ids')
|
|
336
336
|
end
|
|
337
337
|
|
|
338
|
-
it
|
|
338
|
+
it 'appears in order defined' do
|
|
339
339
|
RailsAdmin.config Team do
|
|
340
340
|
edit do
|
|
341
341
|
field :manager
|
|
@@ -343,64 +343,64 @@ describe "RailsAdmin Config DSL Edit Section" do
|
|
|
343
343
|
field :name
|
|
344
344
|
end
|
|
345
345
|
end
|
|
346
|
-
visit new_path(:
|
|
346
|
+
visit new_path(model_name: 'team')
|
|
347
347
|
should have_selector(:xpath, "//*[contains(@class, 'field')][1]//*[@id='team_manager']")
|
|
348
348
|
should have_selector(:xpath, "//*[contains(@class, 'field')][2]//*[@id='team_division_id']")
|
|
349
349
|
should have_selector(:xpath, "//*[contains(@class, 'field')][3]//*[@id='team_name']")
|
|
350
350
|
end
|
|
351
351
|
|
|
352
|
-
it
|
|
352
|
+
it 'only shows the defined fields if some fields are defined' do
|
|
353
353
|
RailsAdmin.config Team do
|
|
354
354
|
edit do
|
|
355
355
|
field :division
|
|
356
356
|
field :name
|
|
357
357
|
end
|
|
358
358
|
end
|
|
359
|
-
visit new_path(:
|
|
360
|
-
should have_selector(
|
|
361
|
-
should have_selector(
|
|
362
|
-
should have_selector(
|
|
359
|
+
visit new_path(model_name: 'team')
|
|
360
|
+
should have_selector('label', text: 'Division')
|
|
361
|
+
should have_selector('label', text: 'Name')
|
|
362
|
+
should have_selector('.control-group', count: 2)
|
|
363
363
|
end
|
|
364
364
|
|
|
365
|
-
describe
|
|
365
|
+
describe 'I18n awarly' do
|
|
366
366
|
after :each do
|
|
367
367
|
I18n.locale = :en
|
|
368
368
|
end
|
|
369
369
|
|
|
370
|
-
it
|
|
370
|
+
it 'delegates the label option to the ActiveModel API and memoizes it' do
|
|
371
371
|
RailsAdmin.config Team do
|
|
372
372
|
edit do
|
|
373
373
|
field :manager
|
|
374
374
|
field :fans
|
|
375
375
|
end
|
|
376
376
|
end
|
|
377
|
-
visit new_path(:
|
|
378
|
-
should have_selector(
|
|
379
|
-
should have_selector(
|
|
377
|
+
visit new_path(model_name: 'team')
|
|
378
|
+
should have_selector('label', text: 'Team Manager')
|
|
379
|
+
should have_selector('label', text: 'Some Fans')
|
|
380
380
|
I18n.locale = :fr
|
|
381
|
-
visit new_path(:
|
|
382
|
-
should have_selector(
|
|
383
|
-
should have_selector(
|
|
381
|
+
visit new_path(model_name: 'team')
|
|
382
|
+
should have_selector('label', text: "Manager de l'équipe")
|
|
383
|
+
should have_selector('label', text: 'Quelques fans')
|
|
384
384
|
end
|
|
385
385
|
end
|
|
386
386
|
|
|
387
|
-
it
|
|
387
|
+
it 'is renameable' do
|
|
388
388
|
RailsAdmin.config Team do
|
|
389
389
|
edit do
|
|
390
390
|
field :manager do
|
|
391
|
-
label
|
|
391
|
+
label 'Renamed field'
|
|
392
392
|
end
|
|
393
393
|
field :division
|
|
394
394
|
field :name
|
|
395
395
|
end
|
|
396
396
|
end
|
|
397
|
-
visit new_path(:
|
|
398
|
-
should have_selector(
|
|
399
|
-
should have_selector(
|
|
400
|
-
should have_selector(
|
|
397
|
+
visit new_path(model_name: 'team')
|
|
398
|
+
should have_selector('label', text: 'Renamed field')
|
|
399
|
+
should have_selector('label', text: 'Division')
|
|
400
|
+
should have_selector('label', text: 'Name')
|
|
401
401
|
end
|
|
402
402
|
|
|
403
|
-
it
|
|
403
|
+
it 'is renameable by type' do
|
|
404
404
|
RailsAdmin.config Team do
|
|
405
405
|
edit do
|
|
406
406
|
fields_of_type :string do
|
|
@@ -408,23 +408,23 @@ describe "RailsAdmin Config DSL Edit Section" do
|
|
|
408
408
|
end
|
|
409
409
|
end
|
|
410
410
|
end
|
|
411
|
-
visit new_path(:
|
|
412
|
-
should have_selector(
|
|
413
|
-
should have_selector(
|
|
414
|
-
should have_selector(
|
|
415
|
-
should have_selector(
|
|
416
|
-
should have_selector(
|
|
417
|
-
should have_selector(
|
|
418
|
-
should have_selector(
|
|
419
|
-
should have_selector(
|
|
420
|
-
should have_selector(
|
|
421
|
-
should have_selector(
|
|
422
|
-
should have_selector(
|
|
423
|
-
should have_selector(
|
|
424
|
-
should have_selector(
|
|
411
|
+
visit new_path(model_name: 'team')
|
|
412
|
+
should have_selector('label', text: 'Division')
|
|
413
|
+
should have_selector('label', text: 'Name (STRING)')
|
|
414
|
+
should have_selector('label', text: 'Logo url (STRING)')
|
|
415
|
+
should have_selector('label', text: 'Manager (STRING)')
|
|
416
|
+
should have_selector('label', text: 'Ballpark (STRING)')
|
|
417
|
+
should have_selector('label', text: 'Mascot (STRING)')
|
|
418
|
+
should have_selector('label', text: 'Founded')
|
|
419
|
+
should have_selector('label', text: 'Wins')
|
|
420
|
+
should have_selector('label', text: 'Losses')
|
|
421
|
+
should have_selector('label', text: 'Win percentage')
|
|
422
|
+
should have_selector('label', text: 'Revenue')
|
|
423
|
+
should have_selector('label', text: 'Players')
|
|
424
|
+
should have_selector('label', text: 'Fans')
|
|
425
425
|
end
|
|
426
426
|
|
|
427
|
-
it
|
|
427
|
+
it 'is globally renameable by type' do
|
|
428
428
|
RailsAdmin.config Team do
|
|
429
429
|
edit do
|
|
430
430
|
fields_of_type :string do
|
|
@@ -432,23 +432,23 @@ describe "RailsAdmin Config DSL Edit Section" do
|
|
|
432
432
|
end
|
|
433
433
|
end
|
|
434
434
|
end
|
|
435
|
-
visit new_path(:
|
|
436
|
-
should have_selector(
|
|
437
|
-
should have_selector(
|
|
438
|
-
should have_selector(
|
|
439
|
-
should have_selector(
|
|
440
|
-
should have_selector(
|
|
441
|
-
should have_selector(
|
|
442
|
-
should have_selector(
|
|
443
|
-
should have_selector(
|
|
444
|
-
should have_selector(
|
|
445
|
-
should have_selector(
|
|
446
|
-
should have_selector(
|
|
447
|
-
should have_selector(
|
|
448
|
-
should have_selector(
|
|
435
|
+
visit new_path(model_name: 'team')
|
|
436
|
+
should have_selector('label', text: 'Division')
|
|
437
|
+
should have_selector('label', text: 'Name (STRING)')
|
|
438
|
+
should have_selector('label', text: 'Logo url (STRING)')
|
|
439
|
+
should have_selector('label', text: 'Manager (STRING)')
|
|
440
|
+
should have_selector('label', text: 'Ballpark (STRING)')
|
|
441
|
+
should have_selector('label', text: 'Mascot (STRING)')
|
|
442
|
+
should have_selector('label', text: 'Founded')
|
|
443
|
+
should have_selector('label', text: 'Wins')
|
|
444
|
+
should have_selector('label', text: 'Losses')
|
|
445
|
+
should have_selector('label', text: 'Win percentage')
|
|
446
|
+
should have_selector('label', text: 'Revenue')
|
|
447
|
+
should have_selector('label', text: 'Players')
|
|
448
|
+
should have_selector('label', text: 'Fans')
|
|
449
449
|
end
|
|
450
450
|
|
|
451
|
-
it
|
|
451
|
+
it 'is flaggable as read only and be configurable with formatted_value' do
|
|
452
452
|
RailsAdmin.config Team do
|
|
453
453
|
edit do
|
|
454
454
|
field :name do
|
|
@@ -459,11 +459,11 @@ describe "RailsAdmin Config DSL Edit Section" do
|
|
|
459
459
|
end
|
|
460
460
|
end
|
|
461
461
|
end
|
|
462
|
-
visit new_path(:
|
|
462
|
+
visit new_path(model_name: 'team')
|
|
463
463
|
should have_content("I'm outputed in the form")
|
|
464
464
|
end
|
|
465
465
|
|
|
466
|
-
it
|
|
466
|
+
it 'is hideable' do
|
|
467
467
|
RailsAdmin.config Team do
|
|
468
468
|
edit do
|
|
469
469
|
field :manager do
|
|
@@ -473,13 +473,13 @@ describe "RailsAdmin Config DSL Edit Section" do
|
|
|
473
473
|
field :name
|
|
474
474
|
end
|
|
475
475
|
end
|
|
476
|
-
visit new_path(:
|
|
477
|
-
should have_no_selector(
|
|
478
|
-
should have_selector(
|
|
479
|
-
should have_selector(
|
|
476
|
+
visit new_path(model_name: 'team')
|
|
477
|
+
should have_no_selector('#team_manager')
|
|
478
|
+
should have_selector('#team_division_id')
|
|
479
|
+
should have_selector('#team_name')
|
|
480
480
|
end
|
|
481
481
|
|
|
482
|
-
it
|
|
482
|
+
it 'is hideable by type' do
|
|
483
483
|
RailsAdmin.config Team do
|
|
484
484
|
edit do
|
|
485
485
|
fields_of_type :string do
|
|
@@ -487,23 +487,23 @@ describe "RailsAdmin Config DSL Edit Section" do
|
|
|
487
487
|
end
|
|
488
488
|
end
|
|
489
489
|
end
|
|
490
|
-
visit new_path(:
|
|
491
|
-
should have_selector(
|
|
492
|
-
should have_no_selector(
|
|
493
|
-
should have_no_selector(
|
|
494
|
-
should have_no_selector(
|
|
495
|
-
should have_no_selector(
|
|
496
|
-
should have_no_selector(
|
|
497
|
-
should have_selector(
|
|
498
|
-
should have_selector(
|
|
499
|
-
should have_selector(
|
|
500
|
-
should have_selector(
|
|
501
|
-
should have_selector(
|
|
502
|
-
should have_selector(
|
|
503
|
-
should have_selector(
|
|
490
|
+
visit new_path(model_name: 'team')
|
|
491
|
+
should have_selector('label', text: 'Division')
|
|
492
|
+
should have_no_selector('label', text: 'Name')
|
|
493
|
+
should have_no_selector('label', text: 'Logo url')
|
|
494
|
+
should have_no_selector('label', text: 'Manager')
|
|
495
|
+
should have_no_selector('label', text: 'Ballpark')
|
|
496
|
+
should have_no_selector('label', text: 'Mascot')
|
|
497
|
+
should have_selector('label', text: 'Founded')
|
|
498
|
+
should have_selector('label', text: 'Wins')
|
|
499
|
+
should have_selector('label', text: 'Losses')
|
|
500
|
+
should have_selector('label', text: 'Win percentage')
|
|
501
|
+
should have_selector('label', text: 'Revenue')
|
|
502
|
+
should have_selector('label', text: 'Players')
|
|
503
|
+
should have_selector('label', text: 'Fans')
|
|
504
504
|
end
|
|
505
505
|
|
|
506
|
-
it
|
|
506
|
+
it 'is globally hideable by type' do
|
|
507
507
|
RailsAdmin.config Team do
|
|
508
508
|
edit do
|
|
509
509
|
fields_of_type :string do
|
|
@@ -511,23 +511,23 @@ describe "RailsAdmin Config DSL Edit Section" do
|
|
|
511
511
|
end
|
|
512
512
|
end
|
|
513
513
|
end
|
|
514
|
-
visit new_path(:
|
|
515
|
-
should have_selector(
|
|
516
|
-
should have_no_selector(
|
|
517
|
-
should have_no_selector(
|
|
518
|
-
should have_no_selector(
|
|
519
|
-
should have_no_selector(
|
|
520
|
-
should have_no_selector(
|
|
521
|
-
should have_selector(
|
|
522
|
-
should have_selector(
|
|
523
|
-
should have_selector(
|
|
524
|
-
should have_selector(
|
|
525
|
-
should have_selector(
|
|
526
|
-
should have_selector(
|
|
527
|
-
should have_selector(
|
|
514
|
+
visit new_path(model_name: 'team')
|
|
515
|
+
should have_selector('label', text: 'Division')
|
|
516
|
+
should have_no_selector('label', text: 'Name')
|
|
517
|
+
should have_no_selector('label', text: 'Logo url')
|
|
518
|
+
should have_no_selector('label', text: 'Manager')
|
|
519
|
+
should have_no_selector('label', text: 'Ballpark')
|
|
520
|
+
should have_no_selector('label', text: 'Mascot')
|
|
521
|
+
should have_selector('label', text: 'Founded')
|
|
522
|
+
should have_selector('label', text: 'Wins')
|
|
523
|
+
should have_selector('label', text: 'Losses')
|
|
524
|
+
should have_selector('label', text: 'Win percentage')
|
|
525
|
+
should have_selector('label', text: 'Revenue')
|
|
526
|
+
should have_selector('label', text: 'Players')
|
|
527
|
+
should have_selector('label', text: 'Fans')
|
|
528
528
|
end
|
|
529
529
|
|
|
530
|
-
it
|
|
530
|
+
it 'has option to customize the help text' do
|
|
531
531
|
RailsAdmin.config Team do
|
|
532
532
|
edit do
|
|
533
533
|
field :manager do
|
|
@@ -537,13 +537,13 @@ describe "RailsAdmin Config DSL Edit Section" do
|
|
|
537
537
|
field :name
|
|
538
538
|
end
|
|
539
539
|
end
|
|
540
|
-
visit new_path(:
|
|
541
|
-
expect(find(
|
|
542
|
-
expect(find(
|
|
543
|
-
expect(find(
|
|
540
|
+
visit new_path(model_name: 'team')
|
|
541
|
+
expect(find('#team_manager_field .help-block')).to have_content('Required. Length up to 100. Additional help text for manager field.')
|
|
542
|
+
expect(find('#team_division_id_field .help-block')).to have_content('Required')
|
|
543
|
+
expect(find('#team_name_field .help-block')).not_to have_content('Additional help text')
|
|
544
544
|
end
|
|
545
545
|
|
|
546
|
-
it
|
|
546
|
+
it 'has option to override required status' do
|
|
547
547
|
RailsAdmin.config Team do
|
|
548
548
|
edit do
|
|
549
549
|
field :manager do
|
|
@@ -557,13 +557,13 @@ describe "RailsAdmin Config DSL Edit Section" do
|
|
|
557
557
|
end
|
|
558
558
|
end
|
|
559
559
|
end
|
|
560
|
-
visit new_path(:
|
|
561
|
-
expect(find(
|
|
562
|
-
expect(find(
|
|
563
|
-
expect(find(
|
|
560
|
+
visit new_path(model_name: 'team')
|
|
561
|
+
expect(find('#team_manager_field .help-block')).to have_content('Optional')
|
|
562
|
+
expect(find('#team_division_id_field .help-block')).to have_content('Optional')
|
|
563
|
+
expect(find('#team_name_field .help-block')).to have_content(I18n.translate('admin.help.team.name'))
|
|
564
564
|
end
|
|
565
565
|
|
|
566
|
-
it
|
|
566
|
+
it 'can hide the add button on an associated field' do
|
|
567
567
|
RailsAdmin.config Player do
|
|
568
568
|
edit do
|
|
569
569
|
field :team do
|
|
@@ -577,13 +577,13 @@ describe "RailsAdmin Config DSL Edit Section" do
|
|
|
577
577
|
end
|
|
578
578
|
end
|
|
579
579
|
end
|
|
580
|
-
visit new_path(:
|
|
581
|
-
should have_no_selector('a', :
|
|
582
|
-
should have_no_selector('a', :
|
|
583
|
-
should have_no_selector('a', :
|
|
580
|
+
visit new_path(model_name: 'player')
|
|
581
|
+
should have_no_selector('a', text: 'Add a new Team')
|
|
582
|
+
should have_no_selector('a', text: 'Add a new Draft')
|
|
583
|
+
should have_no_selector('a', text: 'Add a new Comment')
|
|
584
584
|
end
|
|
585
585
|
|
|
586
|
-
it
|
|
586
|
+
it 'can show the add button on an associated field' do
|
|
587
587
|
RailsAdmin.config Player do
|
|
588
588
|
edit do
|
|
589
589
|
field :team do
|
|
@@ -597,13 +597,13 @@ describe "RailsAdmin Config DSL Edit Section" do
|
|
|
597
597
|
end
|
|
598
598
|
end
|
|
599
599
|
end
|
|
600
|
-
visit new_path(:
|
|
601
|
-
should have_selector('a', :
|
|
602
|
-
should have_selector('a', :
|
|
603
|
-
should have_selector('a', :
|
|
600
|
+
visit new_path(model_name: 'player')
|
|
601
|
+
should have_selector('a', text: 'Add a new Team')
|
|
602
|
+
should have_selector('a', text: 'Add a new Draft')
|
|
603
|
+
should have_selector('a', text: 'Add a new Comment')
|
|
604
604
|
end
|
|
605
605
|
|
|
606
|
-
it
|
|
606
|
+
it 'can hide the edit button on an associated field' do
|
|
607
607
|
RailsAdmin.config Player do
|
|
608
608
|
edit do
|
|
609
609
|
field :team do
|
|
@@ -614,12 +614,12 @@ describe "RailsAdmin Config DSL Edit Section" do
|
|
|
614
614
|
end
|
|
615
615
|
end
|
|
616
616
|
end
|
|
617
|
-
visit new_path(:
|
|
618
|
-
should have_no_selector('a', :
|
|
619
|
-
should have_no_selector('a', :
|
|
617
|
+
visit new_path(model_name: 'player')
|
|
618
|
+
should have_no_selector('a', text: 'Edit this Team')
|
|
619
|
+
should have_no_selector('a', text: 'Edit this Draft')
|
|
620
620
|
end
|
|
621
621
|
|
|
622
|
-
it
|
|
622
|
+
it 'can show the edit button on an associated field' do
|
|
623
623
|
RailsAdmin.config Player do
|
|
624
624
|
edit do
|
|
625
625
|
field :team do
|
|
@@ -630,15 +630,15 @@ describe "RailsAdmin Config DSL Edit Section" do
|
|
|
630
630
|
end
|
|
631
631
|
end
|
|
632
632
|
end
|
|
633
|
-
visit new_path(:
|
|
634
|
-
should have_selector('a', :
|
|
635
|
-
should have_selector('a', :
|
|
633
|
+
visit new_path(model_name: 'player')
|
|
634
|
+
should have_selector('a', text: 'Edit this Team')
|
|
635
|
+
should have_selector('a', text: 'Edit this Draft')
|
|
636
636
|
end
|
|
637
637
|
|
|
638
638
|
end
|
|
639
639
|
|
|
640
|
-
describe
|
|
641
|
-
it
|
|
640
|
+
describe 'bindings' do
|
|
641
|
+
it 'is present at creation time' do
|
|
642
642
|
RailsAdmin.config do |config|
|
|
643
643
|
config.excluded_models = []
|
|
644
644
|
end
|
|
@@ -650,29 +650,29 @@ describe "RailsAdmin Config DSL Edit Section" do
|
|
|
650
650
|
end
|
|
651
651
|
end
|
|
652
652
|
|
|
653
|
-
visit new_path(:
|
|
653
|
+
visit new_path(model_name: 'category')
|
|
654
654
|
should have_no_css('#category_parent_category_id')
|
|
655
|
-
click_button
|
|
656
|
-
visit edit_path(:
|
|
655
|
+
click_button 'Save' # first(:button, "Save").click
|
|
656
|
+
visit edit_path(model_name: 'category', id: Category.first)
|
|
657
657
|
should have_css('#category_parent_category_id')
|
|
658
|
-
click_button
|
|
658
|
+
click_button 'Save' # first(:button, "Save").click
|
|
659
659
|
should have_content('Category successfully updated')
|
|
660
660
|
end
|
|
661
661
|
end
|
|
662
662
|
|
|
663
|
-
describe
|
|
664
|
-
it
|
|
663
|
+
describe 'nested form' do
|
|
664
|
+
it 'works', js: true do
|
|
665
665
|
@record = FactoryGirl.create :field_test
|
|
666
|
-
@record.nested_field_tests = [NestedFieldTest.create!(:
|
|
667
|
-
visit edit_path(:
|
|
666
|
+
@record.nested_field_tests = [NestedFieldTest.create!(title: 'title 1'), NestedFieldTest.create!(title: 'title 2')]
|
|
667
|
+
visit edit_path(model_name: 'field_test', id: @record.id)
|
|
668
668
|
|
|
669
|
-
find('#field_test_comment_attributes_field .add_nested_fields').click
|
|
670
|
-
fill_in
|
|
669
|
+
find('#field_test_comment_attributes_field .add_nested_fields').click
|
|
670
|
+
fill_in 'field_test_comment_attributes_content', with: 'nested comment content'
|
|
671
671
|
|
|
672
|
-
fill_in
|
|
673
|
-
find('#field_test_nested_field_tests_attributes_1__destroy', :
|
|
672
|
+
fill_in 'field_test_nested_field_tests_attributes_0_title', with: 'nested field test title 1 edited', visible: false
|
|
673
|
+
find('#field_test_nested_field_tests_attributes_1__destroy', visible: false).set('true')
|
|
674
674
|
|
|
675
|
-
click_button
|
|
675
|
+
click_button 'Save' # first(:button, "Save").click
|
|
676
676
|
|
|
677
677
|
@record.reload
|
|
678
678
|
|
|
@@ -681,15 +681,15 @@ describe "RailsAdmin Config DSL Edit Section" do
|
|
|
681
681
|
expect(@record.nested_field_tests[0].title).to eq('nested field test title 1 edited')
|
|
682
682
|
end
|
|
683
683
|
|
|
684
|
-
it
|
|
684
|
+
it 'is optional for has_one' do
|
|
685
685
|
@record = FactoryGirl.create :field_test
|
|
686
|
-
visit edit_path(:
|
|
687
|
-
click_button
|
|
686
|
+
visit edit_path(model_name: 'field_test', id: @record.id)
|
|
687
|
+
click_button 'Save'
|
|
688
688
|
@record.reload
|
|
689
689
|
expect(@record.comment).to be_nil
|
|
690
690
|
end
|
|
691
691
|
|
|
692
|
-
it
|
|
692
|
+
it 'sets bindings[:object] to nested object' do
|
|
693
693
|
RailsAdmin.config(NestedFieldTest) do
|
|
694
694
|
nested do
|
|
695
695
|
field :title do
|
|
@@ -700,173 +700,172 @@ describe "RailsAdmin Config DSL Edit Section" do
|
|
|
700
700
|
end
|
|
701
701
|
end
|
|
702
702
|
@record = FieldTest.create
|
|
703
|
-
@record.nested_field_tests << NestedFieldTest.create!(:
|
|
704
|
-
visit edit_path(:
|
|
703
|
+
@record.nested_field_tests << NestedFieldTest.create!(title: 'title 1')
|
|
704
|
+
visit edit_path(model_name: 'field_test', id: @record.id)
|
|
705
705
|
expect(find('#field_test_nested_field_tests_attributes_0_title_field')).to have_content('NestedFieldTest')
|
|
706
706
|
end
|
|
707
707
|
|
|
708
|
-
it
|
|
709
|
-
visit new_path(:
|
|
708
|
+
it 'is desactivable' do
|
|
709
|
+
visit new_path(model_name: 'field_test')
|
|
710
710
|
should have_selector('#field_test_nested_field_tests_attributes_field .add_nested_fields')
|
|
711
711
|
RailsAdmin.config(FieldTest) do
|
|
712
712
|
configure :nested_field_tests do
|
|
713
713
|
nested_form false
|
|
714
714
|
end
|
|
715
715
|
end
|
|
716
|
-
visit new_path(:
|
|
716
|
+
visit new_path(model_name: 'field_test')
|
|
717
717
|
should have_no_selector('#field_test_nested_field_tests_attributes_field .add_nested_fields')
|
|
718
718
|
end
|
|
719
719
|
|
|
720
|
-
describe
|
|
720
|
+
describe 'with nested_attributes_options given' do
|
|
721
721
|
before do
|
|
722
|
-
allow(FieldTest.nested_attributes_options).to receive(:[]).with(any_args
|
|
723
|
-
and_return(
|
|
722
|
+
allow(FieldTest.nested_attributes_options).to receive(:[]).with(any_args).
|
|
723
|
+
and_return(allow_destroy: true, update_only: false)
|
|
724
724
|
end
|
|
725
725
|
|
|
726
|
-
it
|
|
726
|
+
it 'does not show add button when :update_only is true' do
|
|
727
727
|
allow(FieldTest.nested_attributes_options).to receive(:[]).with(:nested_field_tests).
|
|
728
|
-
and_return(
|
|
729
|
-
visit new_path(:
|
|
728
|
+
and_return(allow_destroy: true, update_only: true)
|
|
729
|
+
visit new_path(model_name: 'field_test')
|
|
730
730
|
should have_selector('.toggler')
|
|
731
731
|
should_not have_selector('#field_test_nested_field_tests_attributes_field .add_nested_fields')
|
|
732
732
|
end
|
|
733
733
|
|
|
734
|
-
it
|
|
734
|
+
it 'does not show destroy button except for newly created when :allow_destroy is false' do
|
|
735
735
|
@record = FieldTest.create
|
|
736
|
-
@record.nested_field_tests << NestedFieldTest.create!(:
|
|
736
|
+
@record.nested_field_tests << NestedFieldTest.create!(title: 'nested title 1')
|
|
737
737
|
allow(FieldTest.nested_attributes_options).to receive(:[]).with(:nested_field_tests).
|
|
738
|
-
and_return(
|
|
739
|
-
visit edit_path(:
|
|
738
|
+
and_return(allow_destroy: false, update_only: false)
|
|
739
|
+
visit edit_path(model_name: 'field_test', id: @record.id)
|
|
740
740
|
expect(find('#field_test_nested_field_tests_attributes_0_title').value).to eq('nested title 1')
|
|
741
741
|
should_not have_selector('form .remove_nested_fields')
|
|
742
|
-
expect(find('div#nested_field_tests_fields_blueprint', :
|
|
742
|
+
expect(find('div#nested_field_tests_fields_blueprint', visible: false)[:'data-blueprint']).to match(
|
|
743
743
|
/<a[^>]* class="remove_nested_fields"[^>]*>/)
|
|
744
744
|
end
|
|
745
745
|
end
|
|
746
746
|
|
|
747
747
|
describe "when a field which have the same name of nested_in field's" do
|
|
748
748
|
it "does not hide fields which are not associated with nesting parent field's model" do
|
|
749
|
-
visit new_path(:
|
|
749
|
+
visit new_path(model_name: 'field_test')
|
|
750
750
|
should_not have_selector('select#field_test_nested_field_tests_attributes_new_nested_field_tests_field_test_id')
|
|
751
|
-
expect(find('div#nested_field_tests_fields_blueprint', :
|
|
751
|
+
expect(find('div#nested_field_tests_fields_blueprint', visible: false)[:'data-blueprint']).to match(
|
|
752
752
|
/<select[^>]* id="field_test_nested_field_tests_attributes_new_nested_field_tests_another_field_test_id"[^>]*>/)
|
|
753
753
|
end
|
|
754
754
|
end
|
|
755
755
|
end
|
|
756
756
|
|
|
757
|
-
describe
|
|
758
|
-
it
|
|
757
|
+
describe 'embedded model', mongoid: true do
|
|
758
|
+
it 'works' do
|
|
759
759
|
@record = FactoryGirl.create :field_test
|
|
760
|
-
2.times.each{|i| @record.embeds.create :
|
|
761
|
-
visit edit_path(:
|
|
762
|
-
fill_in
|
|
760
|
+
2.times.each { |i| @record.embeds.create name: "embed #{i}" }
|
|
761
|
+
visit edit_path(model_name: 'field_test', id: @record.id)
|
|
762
|
+
fill_in 'field_test_embeds_attributes_0_name', with: 'embed 1 edited'
|
|
763
763
|
page.find('#field_test_embeds_attributes_1__destroy').set('true')
|
|
764
|
-
click_button
|
|
764
|
+
click_button 'Save' # first(:button, "Save").click
|
|
765
765
|
@record.reload
|
|
766
766
|
expect(@record.embeds.length).to eq(1)
|
|
767
767
|
expect(@record.embeds[0].name).to eq('embed 1 edited')
|
|
768
768
|
end
|
|
769
769
|
end
|
|
770
770
|
|
|
771
|
+
describe 'fields which are nullable and have AR validations', active_record: true do
|
|
771
772
|
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
it "is required" do
|
|
773
|
+
it 'is required' do
|
|
775
774
|
# draft.notes is nullable and has no validation
|
|
776
|
-
field = RailsAdmin
|
|
775
|
+
field = RailsAdmin.config('Draft').edit.fields.detect { |f| f.name == :notes }
|
|
777
776
|
expect(field.properties[:nullable?]).to be_true
|
|
778
777
|
expect(field.required?).to be_false
|
|
779
778
|
|
|
780
779
|
# draft.date is nullable in the schema but has an AR
|
|
781
780
|
# validates_presence_of validation that makes it required
|
|
782
|
-
field = RailsAdmin
|
|
781
|
+
field = RailsAdmin.config('Draft').edit.fields.detect { |f| f.name == :date }
|
|
783
782
|
expect(field.properties[:nullable?]).to be_true
|
|
784
783
|
expect(field.required?).to be_true
|
|
785
784
|
|
|
786
785
|
# draft.round is nullable in the schema but has an AR
|
|
787
786
|
# validates_numericality_of validation that makes it required
|
|
788
|
-
field = RailsAdmin
|
|
787
|
+
field = RailsAdmin.config('Draft').edit.fields.detect { |f| f.name == :round }
|
|
789
788
|
expect(field.properties[:nullable?]).to be_true
|
|
790
789
|
expect(field.required?).to be_true
|
|
791
790
|
|
|
792
791
|
# team.revenue is nullable in the schema but has an AR
|
|
793
792
|
# validates_numericality_of validation that allows nil
|
|
794
|
-
field = RailsAdmin
|
|
793
|
+
field = RailsAdmin.config('Team').edit.fields.detect { |f| f.name == :revenue }
|
|
795
794
|
expect(field.properties[:nullable?]).to be_true
|
|
796
795
|
expect(field.required?).to be_false
|
|
797
796
|
end
|
|
798
797
|
end
|
|
799
798
|
|
|
800
|
-
describe
|
|
801
|
-
it
|
|
799
|
+
describe 'CKEditor Support' do
|
|
800
|
+
it 'adds Javascript to enable CKEditor' do
|
|
802
801
|
RailsAdmin.config Draft do
|
|
803
802
|
edit do
|
|
804
803
|
field :notes, :ck_editor
|
|
805
804
|
end
|
|
806
805
|
end
|
|
807
|
-
visit new_path(:
|
|
806
|
+
visit new_path(model_name: 'draft')
|
|
808
807
|
should have_selector('textarea#draft_notes[data-richtext="ckeditor"]')
|
|
809
808
|
end
|
|
810
809
|
end
|
|
811
810
|
|
|
812
|
-
describe
|
|
813
|
-
it
|
|
811
|
+
describe 'CodeMirror Support' do
|
|
812
|
+
it 'adds Javascript to enable CodeMirror' do
|
|
814
813
|
RailsAdmin.config Draft do
|
|
815
814
|
edit do
|
|
816
815
|
field :notes, :code_mirror
|
|
817
816
|
end
|
|
818
817
|
end
|
|
819
|
-
visit new_path(:
|
|
818
|
+
visit new_path(model_name: 'draft')
|
|
820
819
|
should have_selector('textarea#draft_notes[data-richtext="codemirror"]')
|
|
821
820
|
end
|
|
822
821
|
end
|
|
823
822
|
|
|
824
|
-
describe
|
|
825
|
-
it
|
|
823
|
+
describe 'bootstrap_wysihtml5 Support' do
|
|
824
|
+
it 'adds Javascript to enable bootstrap_wysihtml5' do
|
|
826
825
|
RailsAdmin.config Draft do
|
|
827
826
|
edit do
|
|
828
827
|
field :notes, :wysihtml5
|
|
829
828
|
end
|
|
830
829
|
end
|
|
831
|
-
visit new_path(:
|
|
830
|
+
visit new_path(model_name: 'draft')
|
|
832
831
|
should have_selector('textarea#draft_notes[data-richtext="bootstrap-wysihtml5"]')
|
|
833
832
|
end
|
|
834
833
|
|
|
835
|
-
it
|
|
834
|
+
it 'should include custom wysihtml5 configuration' do
|
|
836
835
|
RailsAdmin.config Draft do
|
|
837
836
|
edit do
|
|
838
837
|
field :notes, :wysihtml5 do
|
|
839
|
-
config_options :
|
|
838
|
+
config_options image: false
|
|
840
839
|
css_location 'stub_css.css'
|
|
841
840
|
js_location 'stub_js.js'
|
|
842
841
|
end
|
|
843
842
|
end
|
|
844
843
|
end
|
|
845
844
|
|
|
846
|
-
visit new_path(:
|
|
845
|
+
visit new_path(model_name: 'draft')
|
|
847
846
|
should have_selector("textarea#draft_notes[data-richtext=\"bootstrap-wysihtml5\"][data-options]")
|
|
848
847
|
end
|
|
849
848
|
end
|
|
850
849
|
|
|
851
|
-
describe
|
|
850
|
+
describe 'Paperclip Support' do
|
|
852
851
|
|
|
853
|
-
it
|
|
852
|
+
it 'shows a file upload field' do
|
|
854
853
|
RailsAdmin.config User do
|
|
855
854
|
edit do
|
|
856
855
|
field :avatar
|
|
857
856
|
end
|
|
858
857
|
end
|
|
859
|
-
visit new_path(:
|
|
860
|
-
should have_selector(
|
|
858
|
+
visit new_path(model_name: 'user')
|
|
859
|
+
should have_selector('input#user_avatar')
|
|
861
860
|
end
|
|
862
861
|
end
|
|
863
862
|
|
|
864
|
-
describe
|
|
863
|
+
describe 'Enum field support' do
|
|
865
864
|
describe "when object responds to '\#{method}_enum'" do
|
|
866
865
|
before do
|
|
867
866
|
Team.class_eval do
|
|
868
867
|
def color_enum
|
|
869
|
-
|
|
868
|
+
%w(blue green red)
|
|
870
869
|
end
|
|
871
870
|
end
|
|
872
871
|
RailsAdmin.config Team do
|
|
@@ -874,17 +873,17 @@ describe "RailsAdmin Config DSL Edit Section" do
|
|
|
874
873
|
field :color
|
|
875
874
|
end
|
|
876
875
|
end
|
|
877
|
-
visit new_path(:
|
|
876
|
+
visit new_path(model_name: 'team')
|
|
878
877
|
end
|
|
879
878
|
|
|
880
879
|
after do
|
|
881
880
|
Team.send(:remove_method, :color_enum)
|
|
882
881
|
end
|
|
883
882
|
|
|
884
|
-
it
|
|
885
|
-
should have_selector(
|
|
886
|
-
should_not have_selector(
|
|
887
|
-
should have_content(
|
|
883
|
+
it 'auto-detects enumeration' do
|
|
884
|
+
should have_selector('.enum_type select')
|
|
885
|
+
should_not have_selector('.enum_type select[multiple]')
|
|
886
|
+
should have_content('green')
|
|
888
887
|
end
|
|
889
888
|
end
|
|
890
889
|
|
|
@@ -892,7 +891,7 @@ describe "RailsAdmin Config DSL Edit Section" do
|
|
|
892
891
|
before do
|
|
893
892
|
Team.instance_eval do
|
|
894
893
|
def color_enum
|
|
895
|
-
|
|
894
|
+
%w(blue green red)
|
|
896
895
|
end
|
|
897
896
|
end
|
|
898
897
|
RailsAdmin.config Team do
|
|
@@ -900,24 +899,24 @@ describe "RailsAdmin Config DSL Edit Section" do
|
|
|
900
899
|
field :color
|
|
901
900
|
end
|
|
902
901
|
end
|
|
903
|
-
visit new_path(:
|
|
902
|
+
visit new_path(model_name: 'team')
|
|
904
903
|
end
|
|
905
904
|
|
|
906
905
|
after do
|
|
907
906
|
Team.instance_eval { undef :color_enum }
|
|
908
907
|
end
|
|
909
908
|
|
|
910
|
-
it
|
|
911
|
-
should have_selector(
|
|
912
|
-
should have_content(
|
|
909
|
+
it 'auto-detects enumeration' do
|
|
910
|
+
should have_selector('.enum_type select')
|
|
911
|
+
should have_content('green')
|
|
913
912
|
end
|
|
914
913
|
end
|
|
915
914
|
|
|
916
|
-
describe
|
|
915
|
+
describe 'the enum instance method' do
|
|
917
916
|
before do
|
|
918
917
|
Team.class_eval do
|
|
919
918
|
def color_list
|
|
920
|
-
|
|
919
|
+
%w(blue green red)
|
|
921
920
|
end
|
|
922
921
|
end
|
|
923
922
|
RailsAdmin.config Team do
|
|
@@ -927,24 +926,24 @@ describe "RailsAdmin Config DSL Edit Section" do
|
|
|
927
926
|
end
|
|
928
927
|
end
|
|
929
928
|
end
|
|
930
|
-
visit new_path(:
|
|
929
|
+
visit new_path(model_name: 'team')
|
|
931
930
|
end
|
|
932
931
|
|
|
933
932
|
after do
|
|
934
933
|
Team.send(:remove_method, :color_list)
|
|
935
934
|
end
|
|
936
935
|
|
|
937
|
-
it
|
|
938
|
-
should have_selector(
|
|
939
|
-
should have_content(
|
|
936
|
+
it 'allows configuration' do
|
|
937
|
+
should have_selector('.enum_type select')
|
|
938
|
+
should have_content('green')
|
|
940
939
|
end
|
|
941
940
|
end
|
|
942
941
|
|
|
943
|
-
describe
|
|
942
|
+
describe 'the enum class method' do
|
|
944
943
|
before do
|
|
945
944
|
Team.instance_eval do
|
|
946
945
|
def color_list
|
|
947
|
-
|
|
946
|
+
%w(blue green red)
|
|
948
947
|
end
|
|
949
948
|
end
|
|
950
949
|
RailsAdmin.config Team do
|
|
@@ -954,24 +953,24 @@ describe "RailsAdmin Config DSL Edit Section" do
|
|
|
954
953
|
end
|
|
955
954
|
end
|
|
956
955
|
end
|
|
957
|
-
visit new_path(:
|
|
956
|
+
visit new_path(model_name: 'team')
|
|
958
957
|
end
|
|
959
958
|
|
|
960
959
|
after do
|
|
961
960
|
Team.instance_eval { undef :color_list }
|
|
962
961
|
end
|
|
963
962
|
|
|
964
|
-
it
|
|
965
|
-
should have_selector(
|
|
966
|
-
should have_content(
|
|
963
|
+
it 'allows configuration' do
|
|
964
|
+
should have_selector('.enum_type select')
|
|
965
|
+
should have_content('green')
|
|
967
966
|
end
|
|
968
967
|
end
|
|
969
968
|
|
|
970
|
-
describe
|
|
969
|
+
describe 'when overriding enum configuration' do
|
|
971
970
|
before do
|
|
972
971
|
Team.class_eval do
|
|
973
972
|
def color_list
|
|
974
|
-
|
|
973
|
+
%w(blue green red)
|
|
975
974
|
end
|
|
976
975
|
end
|
|
977
976
|
RailsAdmin.config Team do
|
|
@@ -979,34 +978,34 @@ describe "RailsAdmin Config DSL Edit Section" do
|
|
|
979
978
|
field :color, :enum do
|
|
980
979
|
enum_method :color_list
|
|
981
980
|
enum do
|
|
982
|
-
|
|
981
|
+
%w(yellow black)
|
|
983
982
|
end
|
|
984
983
|
end
|
|
985
984
|
end
|
|
986
985
|
end
|
|
987
|
-
visit new_path(:
|
|
986
|
+
visit new_path(model_name: 'team')
|
|
988
987
|
end
|
|
989
988
|
|
|
990
989
|
after do
|
|
991
990
|
Team.send(:remove_method, :color_list)
|
|
992
991
|
end
|
|
993
992
|
|
|
994
|
-
it
|
|
995
|
-
should have_selector(
|
|
996
|
-
should have_no_content(
|
|
997
|
-
should have_content(
|
|
993
|
+
it 'allows direct listing of enumeration options and override enum method' do
|
|
994
|
+
should have_selector('.enum_type select')
|
|
995
|
+
should have_no_content('green')
|
|
996
|
+
should have_content('yellow')
|
|
998
997
|
end
|
|
999
998
|
end
|
|
1000
999
|
|
|
1001
|
-
describe
|
|
1000
|
+
describe 'when serialize is enabled in ActiveRecord model', active_record: true do
|
|
1002
1001
|
before do
|
|
1003
1002
|
Team.instance_eval do
|
|
1004
1003
|
serialize :color
|
|
1005
1004
|
def color_enum
|
|
1006
|
-
|
|
1005
|
+
%w(blue green red)
|
|
1007
1006
|
end
|
|
1008
1007
|
end
|
|
1009
|
-
visit new_path(:
|
|
1008
|
+
visit new_path(model_name: 'team')
|
|
1010
1009
|
end
|
|
1011
1010
|
|
|
1012
1011
|
after do
|
|
@@ -1014,44 +1013,44 @@ describe "RailsAdmin Config DSL Edit Section" do
|
|
|
1014
1013
|
Team.instance_eval { undef :color_enum }
|
|
1015
1014
|
end
|
|
1016
1015
|
|
|
1017
|
-
it
|
|
1018
|
-
should have_selector(
|
|
1016
|
+
it 'makes enumeration multi-selectable' do
|
|
1017
|
+
should have_selector('.enum_type select[multiple]')
|
|
1019
1018
|
end
|
|
1020
1019
|
end
|
|
1021
1020
|
|
|
1022
|
-
describe
|
|
1021
|
+
describe 'when serialize is enabled in Mongoid model', mongoid: true do
|
|
1023
1022
|
before do
|
|
1024
1023
|
Team.instance_eval do
|
|
1025
|
-
field :color, :
|
|
1024
|
+
field :color, type: Array
|
|
1026
1025
|
def color_enum
|
|
1027
|
-
|
|
1026
|
+
%w(blue green red)
|
|
1028
1027
|
end
|
|
1029
1028
|
end
|
|
1030
|
-
visit new_path(:
|
|
1029
|
+
visit new_path(model_name: 'team')
|
|
1031
1030
|
end
|
|
1032
1031
|
|
|
1033
1032
|
after do
|
|
1034
1033
|
Team.instance_eval do
|
|
1035
|
-
field :color, :
|
|
1034
|
+
field :color, type: String
|
|
1036
1035
|
undef :color_enum
|
|
1037
1036
|
end
|
|
1038
1037
|
end
|
|
1039
1038
|
|
|
1040
|
-
it
|
|
1041
|
-
should have_selector(
|
|
1039
|
+
it 'makes enumeration multi-selectable' do
|
|
1040
|
+
should have_selector('.enum_type select[multiple]')
|
|
1042
1041
|
end
|
|
1043
1042
|
end
|
|
1044
1043
|
end
|
|
1045
1044
|
|
|
1046
|
-
describe
|
|
1047
|
-
it
|
|
1045
|
+
describe 'ColorPicker Support' do
|
|
1046
|
+
it 'shows input with class color' do
|
|
1048
1047
|
RailsAdmin.config Team do
|
|
1049
1048
|
edit do
|
|
1050
1049
|
field :color, :color
|
|
1051
1050
|
end
|
|
1052
1051
|
end
|
|
1053
|
-
visit new_path(:
|
|
1054
|
-
should have_selector(
|
|
1052
|
+
visit new_path(model_name: 'team')
|
|
1053
|
+
should have_selector('.color_type input')
|
|
1055
1054
|
end
|
|
1056
1055
|
end
|
|
1057
1056
|
|