ext_form 0.1.4
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
- data/MIT-LICENSE +20 -0
- data/Rakefile +31 -0
- data/app/assets/javascripts/ext_form/application.js +78 -0
- data/app/assets/javascripts/typeahead.js +1159 -0
- data/app/assets/stylesheets/ext_form/application.scss +15 -0
- data/app/assets/stylesheets/ext_form/application_bootstrap.css.scss +197 -0
- data/app/assets/stylesheets/ext_form/base.css.scss +32 -0
- data/config/routes.rb +2 -0
- data/lib/ext_form/builders/form_builder_base.rb +224 -0
- data/lib/ext_form/builders.rb +10 -0
- data/lib/ext_form/components/input_addons.rb +34 -0
- data/lib/ext_form/components.rb +7 -0
- data/lib/ext_form/engine.rb +14 -0
- data/lib/ext_form/helpers/form_helper.rb +222 -0
- data/lib/ext_form/helpers/form_tag_helper.rb +60 -0
- data/lib/ext_form/helpers/tags/auto_complete.rb +25 -0
- data/lib/ext_form/helpers/tags/collection_select.rb +19 -0
- data/lib/ext_form/helpers/tags/dt_picker.rb +27 -0
- data/lib/ext_form/helpers/tags/grouped_collection_select.rb +19 -0
- data/lib/ext_form/helpers/tags.rb +12 -0
- data/lib/ext_form/inputs/auto_complete.rb +11 -0
- data/lib/ext_form/inputs/base_mixin.rb +11 -0
- data/lib/ext_form/inputs/bootstrap_inputs_mixin.rb +13 -0
- data/lib/ext_form/inputs/collection_select.rb +15 -0
- data/lib/ext_form/inputs/dt_picker.rb +20 -0
- data/lib/ext_form/inputs/grouped_collection_select.rb +13 -0
- data/lib/ext_form/inputs.rb +15 -0
- data/lib/ext_form/layouts/base_layout.rb +82 -0
- data/lib/ext_form/layouts/bootstrap_layout.rb +23 -0
- data/lib/ext_form/layouts/default_layout.rb +29 -0
- data/lib/ext_form/layouts.rb +11 -0
- data/lib/ext_form/version.rb +3 -0
- data/lib/ext_form/wrappers/many_mixin.rb +18 -0
- data/lib/ext_form/wrappers/mixin.rb +49 -0
- data/lib/ext_form/wrappers/single_mixin.rb +18 -0
- data/lib/ext_form/wrappers.rb +11 -0
- data/lib/ext_form.rb +52 -0
- data/lib/generators/ext_form/USAGE +3 -0
- data/lib/generators/ext_form/install_generator.rb +113 -0
- data/lib/generators/ext_form/templates/README +15 -0
- data/lib/generators/ext_form/templates/_form.html.erb +12 -0
- data/lib/generators/ext_form/templates/_form.html.haml +12 -0
- data/lib/generators/ext_form/templates/_form.html.slim +12 -0
- data/lib/generators/ext_form/templates/config/initializers/z_ext_form.rb +70 -0
- data/lib/generators/ext_form/templates/config/initializers/z_ext_form_bootstrap.rb +59 -0
- data/lib/generators/ext_form/templates/config/locales/ext_form.en.yml +2 -0
- data/lib/tasks/ext_form_tasks.rake +4 -0
- data/spec/builders/ext_form_builder_bs_spec.rb +78 -0
- data/spec/builders/ext_form_builder_spec.rb +100 -0
- data/spec/dummy/README.rdoc +28 -0
- data/spec/dummy/Rakefile +6 -0
- data/spec/dummy/app/assets/javascripts/application.js +27 -0
- data/spec/dummy/app/assets/javascripts/order_headers.js +2 -0
- data/spec/dummy/app/assets/javascripts/order_lines.js +2 -0
- data/spec/dummy/app/assets/javascripts/shipments.js +2 -0
- data/spec/dummy/app/assets/stylesheets/application.css.scss +17 -0
- data/spec/dummy/app/assets/stylesheets/order_headers.css +4 -0
- data/spec/dummy/app/assets/stylesheets/order_lines.css +4 -0
- data/spec/dummy/app/assets/stylesheets/scaffold.css +56 -0
- data/spec/dummy/app/assets/stylesheets/shipments.css +4 -0
- data/spec/dummy/app/controllers/application_controller.rb +5 -0
- data/spec/dummy/app/controllers/order_headers_controller.rb +62 -0
- data/spec/dummy/app/controllers/order_lines_controller.rb +58 -0
- data/spec/dummy/app/controllers/shipments_controller.rb +58 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/helpers/order_headers_helper.rb +2 -0
- data/spec/dummy/app/helpers/order_lines_helper.rb +2 -0
- data/spec/dummy/app/helpers/shipments_helper.rb +2 -0
- data/spec/dummy/app/models/order_header.rb +9 -0
- data/spec/dummy/app/models/order_line.rb +6 -0
- data/spec/dummy/app/models/order_type.rb +2 -0
- data/spec/dummy/app/models/shipment.rb +3 -0
- data/spec/dummy/app/views/layouts/application.html.erb +17 -0
- data/spec/dummy/app/views/order_headers/_form.html.erb +53 -0
- data/spec/dummy/app/views/order_headers/edit.html.erb +3 -0
- data/spec/dummy/app/views/order_headers/index.html.erb +29 -0
- data/spec/dummy/app/views/order_headers/new.html.erb +5 -0
- data/spec/dummy/app/views/order_headers/show.html.erb +14 -0
- data/spec/dummy/app/views/order_lines/_form.html.erb +33 -0
- data/spec/dummy/app/views/order_lines/edit.html.erb +6 -0
- data/spec/dummy/app/views/order_lines/index.html.erb +33 -0
- data/spec/dummy/app/views/order_lines/new.html.erb +5 -0
- data/spec/dummy/app/views/order_lines/show.html.erb +24 -0
- data/spec/dummy/app/views/shipments/_form.html.erb +37 -0
- data/spec/dummy/app/views/shipments/edit.html.erb +6 -0
- data/spec/dummy/app/views/shipments/index.html.erb +35 -0
- data/spec/dummy/app/views/shipments/new.html.erb +5 -0
- data/spec/dummy/app/views/shipments/show.html.erb +29 -0
- data/spec/dummy/bin/bundle +3 -0
- data/spec/dummy/bin/rails +4 -0
- data/spec/dummy/bin/rake +4 -0
- data/spec/dummy/config/application.rb +28 -0
- data/spec/dummy/config/boot.rb +5 -0
- data/spec/dummy/config/database.yml +25 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +29 -0
- data/spec/dummy/config/environments/production.rb +80 -0
- data/spec/dummy/config/environments/test.rb +36 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/dummy/config/initializers/inflections.rb +16 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/secret_token.rb +12 -0
- data/spec/dummy/config/initializers/session_store.rb +3 -0
- data/spec/dummy/config/initializers/simple_form.rb +145 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/initializers/z_ext_form.rb +70 -0
- data/spec/dummy/config/initializers/z_ext_form_bootstrap.rb +59 -0
- data/spec/dummy/config/locales/en.yml +23 -0
- data/spec/dummy/config/locales/ext_form.en.yml +26 -0
- data/spec/dummy/config/locales/simple_form.en.yml +26 -0
- data/spec/dummy/config/routes.rb +10 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/20130822091938_create_order_headers.rb +10 -0
- data/spec/dummy/db/migrate/20130822092035_create_order_lines.rb +12 -0
- data/spec/dummy/db/migrate/20130822092136_create_shipments.rb +13 -0
- data/spec/dummy/db/migrate/20130913025429_add_order_date_to_order_headers.rb +5 -0
- data/spec/dummy/db/migrate/20130913082503_add_bill_to_customer_to_order_headers.rb +7 -0
- data/spec/dummy/db/migrate/20130914101200_create_order_types.rb +9 -0
- data/spec/dummy/db/migrate/20130914101232_add_order_type_id_to_order_headers.rb +5 -0
- data/spec/dummy/db/schema.rb +64 -0
- data/spec/dummy/db/seeds.rb +3 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/lib/templates/erb/scaffold/_form.html.erb +12 -0
- data/spec/dummy/lib/templates/slim/scaffold/_form.html.slim +12 -0
- data/spec/dummy/log/development.log +30851 -0
- data/spec/dummy/log/test.log +8888 -0
- data/spec/dummy/public/404.html +58 -0
- data/spec/dummy/public/422.html +58 -0
- data/spec/dummy/public/500.html +57 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/public/javascripts/nested_form.js +120 -0
- data/spec/dummy/spec/factories/order_types.rb +7 -0
- data/spec/dummy/tmp/cache/assets/development/sass/0be6a8d566db001f251fcb3d330b625bdcde50b0/select2.css.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/0f754ef2ba2bade74c446fd0dc8d2c538b2ee4ba/bootstrap-datetimepicker.cssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/43e39f3776203b555edf4427cbeca13a3e80bf4e/application.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/43e39f3776203b555edf4427cbeca13a3e80bf4e/application_bootstrap.css.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/43e39f3776203b555edf4427cbeca13a3e80bf4e/base.css.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/95877ca3fb97306427e6a8c3200a77fa726c2979/bootstrap-responsive.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/95877ca3fb97306427e6a8c3200a77fa726c2979/bootstrap.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/c75ed21fe4fe5a931216dc17f876dea4e6c936a7/_accordion.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/c75ed21fe4fe5a931216dc17f876dea4e6c936a7/_alerts.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/c75ed21fe4fe5a931216dc17f876dea4e6c936a7/_breadcrumbs.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/c75ed21fe4fe5a931216dc17f876dea4e6c936a7/_button-groups.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/c75ed21fe4fe5a931216dc17f876dea4e6c936a7/_buttons.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/c75ed21fe4fe5a931216dc17f876dea4e6c936a7/_carousel.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/c75ed21fe4fe5a931216dc17f876dea4e6c936a7/_close.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/c75ed21fe4fe5a931216dc17f876dea4e6c936a7/_code.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/c75ed21fe4fe5a931216dc17f876dea4e6c936a7/_component-animations.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/c75ed21fe4fe5a931216dc17f876dea4e6c936a7/_dropdowns.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/c75ed21fe4fe5a931216dc17f876dea4e6c936a7/_forms.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/c75ed21fe4fe5a931216dc17f876dea4e6c936a7/_grid.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/c75ed21fe4fe5a931216dc17f876dea4e6c936a7/_hero-unit.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/c75ed21fe4fe5a931216dc17f876dea4e6c936a7/_labels-badges.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/c75ed21fe4fe5a931216dc17f876dea4e6c936a7/_layouts.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/c75ed21fe4fe5a931216dc17f876dea4e6c936a7/_media.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/c75ed21fe4fe5a931216dc17f876dea4e6c936a7/_mixins.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/c75ed21fe4fe5a931216dc17f876dea4e6c936a7/_modals.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/c75ed21fe4fe5a931216dc17f876dea4e6c936a7/_navbar.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/c75ed21fe4fe5a931216dc17f876dea4e6c936a7/_navs.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/c75ed21fe4fe5a931216dc17f876dea4e6c936a7/_pager.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/c75ed21fe4fe5a931216dc17f876dea4e6c936a7/_pagination.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/c75ed21fe4fe5a931216dc17f876dea4e6c936a7/_popovers.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/c75ed21fe4fe5a931216dc17f876dea4e6c936a7/_progress-bars.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/c75ed21fe4fe5a931216dc17f876dea4e6c936a7/_reset.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/c75ed21fe4fe5a931216dc17f876dea4e6c936a7/_responsive-1200px-min.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/c75ed21fe4fe5a931216dc17f876dea4e6c936a7/_responsive-767px-max.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/c75ed21fe4fe5a931216dc17f876dea4e6c936a7/_responsive-768px-979px.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/c75ed21fe4fe5a931216dc17f876dea4e6c936a7/_responsive-navbar.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/c75ed21fe4fe5a931216dc17f876dea4e6c936a7/_responsive-utilities.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/c75ed21fe4fe5a931216dc17f876dea4e6c936a7/_scaffolding.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/c75ed21fe4fe5a931216dc17f876dea4e6c936a7/_sprites.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/c75ed21fe4fe5a931216dc17f876dea4e6c936a7/_tables.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/c75ed21fe4fe5a931216dc17f876dea4e6c936a7/_thumbnails.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/c75ed21fe4fe5a931216dc17f876dea4e6c936a7/_tooltip.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/c75ed21fe4fe5a931216dc17f876dea4e6c936a7/_type.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/c75ed21fe4fe5a931216dc17f876dea4e6c936a7/_utilities.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/c75ed21fe4fe5a931216dc17f876dea4e6c936a7/_variables.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/c75ed21fe4fe5a931216dc17f876dea4e6c936a7/_wells.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/c75ed21fe4fe5a931216dc17f876dea4e6c936a7/bootstrap.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/c75ed21fe4fe5a931216dc17f876dea4e6c936a7/responsive.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/d8cdc3e1698ff449e2e9ab35ca24a00a8d724935/application.css.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/d8cdc3e1698ff449e2e9ab35ca24a00a8d724935/scaffolds.css.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sass/d8cdc3e1698ff449e2e9ab35ca24a00a8d724935/test_scaflds.css.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/00171108bd75279e653c1ffb5b4650b8 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/05029f2e1c68338ac88af8005acab3ca +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/08318fdb5f5b783c22442a6aeb73730e +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/08f00d4a1bac197d382c2269a184f9e4 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/0b6c06f6bcf535567c19f70f7aa5144d +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/0b9076b70e22dd7976e589018cdf65ca +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/0e8461b429e0249b8dc74d457fcc17d3 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/0f074c0ea10680a3ba979bbd1d2ff756 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/0f5877c1fb159c1a5f1602569a0cdde2 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/0f8cf3c40768cf2ab52c613a7efc30cb +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/10fcfbe6ebae11a40c8eac41939a1b9a +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/126ebaa8ad57e48772c035caac2ed632 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/13c6f1c4603d5736407a6b5f7889a056 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/13f8355b45d7c46c05177fef3b7f6283 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/157d2eedb817dece09700185cd4101e3 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/16039dc737e753516f4399dcd38d6de7 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/19699f0bd9bbacb926aa665d057d7dcc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/2013f24e3245656ca1e5890649a0b023 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/26bd44751cc9640593dc583d6be8410d +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/272f5096d49f011351e9f4780c313741 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/32ef1c9e94a83350bad5e887c416c5b6 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/367865b241c60ef0e9a85c9f9910f7d4 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/371bf96e99717688ed7313a0c53f4212 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/37984c7de5e7d22002a378234035e51c +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/4201264f7710f91dc1c389a2497eda7d +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/4843087e4f4577291013564353d9be98 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/490b125495df24b66caa52d70f8aa64d +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/4c9470e682578ab5fc183f98fae5f42d +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/4e81b6b6eb1e1462b1eea2caee6bfcc6 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/510da110ae528e2d22533be39ff696c5 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/518c73ecd762cbf6d85a3ae693e08d01 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/56401bbafd08927b55572c8ef7e88883 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/5865993e4fa54b7f6f0186ebaffff12b +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/59f25755df49e4db5915553e3d2ef412 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/5a48dae6fe5b78da3082b1347022ee01 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/5f62321f43b55988b6cb95367556d822 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/61fab520b090f94084c9a7ffc402ad3c +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/653178c2e0c5d134069e58196f7bf28e +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/661c74f15a009d482fdad85f811e6f8e +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/6668d3ee30c1513097c95bcc0a27696a +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/690b40f9a765547b660ac81cbd5ed378 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/6bdff36d9dbeb7ae3e6802b482a04668 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/6eaa97256ef2d58208ab91c60707acdb +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/6fa120c855c745c904828746e82b2b07 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/6fc757c2c8329244ca95d6909865bbc2 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/715840f8887bc1e70ef3cc18b429cbc8 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/754b02ea2ed1c85b7756de6452f4aeb7 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/764fdaef2f219fafc8db0923a56c23a3 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/78fdc1d9add39ed3fdcbf7cae3df4190 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/7a7280187e89f6c4256217ea0fe1e787 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/7b2d3e5e25b0901f78fbf8c9cb9570c4 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/84eb79ed8e43cf9414e6ecfd38c5a19f +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/87172f2d7a412d1fe87d7775d589b883 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/871fe15e38e1cf354ac33b4faf796fd3 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/875849c72f053c7a7674e9fd72ee2cd4 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/87a55c890eedab0cc5d1e3f2c2b2da4b +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/88741eb863751c5d5adb82282f6df5cd +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/8ab512c9b33ac90e699b73469d71f061 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/8cc360b254f1bff91753f954e7591a9b +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/8ec990d84f5dedd35001397078415137 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/9181401ef96921b28b49d4ec48261a4d +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/9409af55392b7f03edb441d5b53b931c +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/94e46c0e76c8f392586af76b0f6c6e93 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/968566581a35be861fa4f8fed757dcae +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/96f8ac0ca90b5e46fb770d1695a77b2d +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/9b51a99e821d1802733dceac6764d18f +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/9d8681a4ce63f327a868f759096673e8 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/a004f4ca229f6e9e761d2c86226e04f4 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/a0a671e624f03533a82b1ec899bf3b21 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/a0f669003bef02490064a16cfdb916fe +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/a411f643e05384fdb860f193e1dbe8f8 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/a4abc5f3fc1bfe41be3470836766d110 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/a82a869a86d5cbcbb101123eb6448f0c +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/a97cd428904e5968d05f7d3a5fd50f85 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/aa87366fe7cd02f1be035665580cf066 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/ada9a8c9882e963e6b98cdcaf20af34f +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/af326fcf9b4f69ff70d3610d0696b585 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/af5ab48d2f371513fb609f8bdec3ac42 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/b245fe00601bf4b4c2bd6ce9286a53dc +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/b51a3679ccee92d6e374deac3359cc69 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/baed877d386dc374496dcd62af36bc5b +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/bc6f2f1da483ac27102f9412ee294dbf +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/bcca522c6302f184f12fe0e8a7d7e71a +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/bd3936370d0f952ada5774e2230046ed +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/c04a836e22ec09c7eae6eae9349efee3 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/c13fc73ceafa45876a901b3e775b83ae +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/c2816385f6bc1d4ef24315437e9353d3 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/c4e265ba144f19c1f646f9d8271c0702 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/d4c36568a5145e04bfbbefd37fecdde7 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/d63d1c956772687b2dd2c9b43533e795 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/d75dd624db3682fd4fed243c5f6f2e69 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/d7d3659361bd25606f9efaba128bf4c1 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/d9fa58e1385bfb03f2ede65c90f36d70 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/da8e37f2c9e3ea8f443def70515d1df0 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/dcff3d1cd16d434b55e09399722e68be +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/e18f7bb0b671acf59ad700724547a456 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/e459168835a5f27b832ace20874f7c10 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/e618b87b000e1c8d606542b2a7b4936f +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/e6df0f40358bfc2568038d9cf71859a5 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/ebe8c427280f71fed250770f7d5e0af8 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/edefa48dfc6b66b08d68e6438d1344b4 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/ee70ec49c833625099b94820cbfaf238 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/eea8d1c182d93d92a52f24a90d5c92af +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/efe3e82d4fe0ca8a3427678a9cd1d070 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/f024e5fd86a61ac8399d564f8202bbc8 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/f12542794a06e22b1dbd97250d49deb1 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/f34759266a45010771006dcbb608d179 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/f466a3fe42e17653acb9980dae9be11a +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/f86d0394f2c6bebf4ad490ce4a37d754 +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/fd5a31651e4fc8cf4a3199e8db16d53e +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/fd71e811fb40f0e16e339622af4c771f +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/fd843e12fcdd9539f8e3d7384a19bb31 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/19699f0bd9bbacb926aa665d057d7dcc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/371bf96e99717688ed7313a0c53f4212 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/59f25755df49e4db5915553e3d2ef412 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/6fc757c2c8329244ca95d6909865bbc2 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/764fdaef2f219fafc8db0923a56c23a3 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/87172f2d7a412d1fe87d7775d589b883 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/88741eb863751c5d5adb82282f6df5cd +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/96f8ac0ca90b5e46fb770d1695a77b2d +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/a4abc5f3fc1bfe41be3470836766d110 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/af326fcf9b4f69ff70d3610d0696b585 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/d63d1c956772687b2dd2c9b43533e795 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/d7d3659361bd25606f9efaba128bf4c1 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/f024e5fd86a61ac8399d564f8202bbc8 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/fd5a31651e4fc8cf4a3199e8db16d53e +0 -0
- data/spec/ext_form_spec.rb +12 -0
- data/spec/factories/order_header_factory.rb +22 -0
- data/spec/helpers/dt_picker_spec.rb +66 -0
- data/spec/helpers/dt_picker_tag_spec.rb +65 -0
- data/spec/helpers/form_helper_bs_spec.rb +102 -0
- data/spec/helpers/form_helper_spec.rb +109 -0
- data/spec/spec_helper.rb +15 -0
- data/spec/support/form_helper.rb +21 -0
- metadata +787 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<h1>Listing shipments</h1>
|
|
2
|
+
|
|
3
|
+
<table>
|
|
4
|
+
<thead>
|
|
5
|
+
<tr>
|
|
6
|
+
<th>Order line</th>
|
|
7
|
+
<th>Shipping date</th>
|
|
8
|
+
<th>Shipping quantity</th>
|
|
9
|
+
<th>Arriving date</th>
|
|
10
|
+
<th>Status</th>
|
|
11
|
+
<th></th>
|
|
12
|
+
<th></th>
|
|
13
|
+
<th></th>
|
|
14
|
+
</tr>
|
|
15
|
+
</thead>
|
|
16
|
+
|
|
17
|
+
<tbody>
|
|
18
|
+
<% @shipments.each do |shipment| %>
|
|
19
|
+
<tr>
|
|
20
|
+
<td><%= shipment.order_line_id %></td>
|
|
21
|
+
<td><%= shipment.shipping_date %></td>
|
|
22
|
+
<td><%= shipment.shipping_quantity %></td>
|
|
23
|
+
<td><%= shipment.arriving_date %></td>
|
|
24
|
+
<td><%= shipment.status %></td>
|
|
25
|
+
<td><%= link_to 'Show', shipment %></td>
|
|
26
|
+
<td><%= link_to 'Edit', edit_shipment_path(shipment) %></td>
|
|
27
|
+
<td><%= link_to 'Destroy', shipment, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
|
28
|
+
</tr>
|
|
29
|
+
<% end %>
|
|
30
|
+
</tbody>
|
|
31
|
+
</table>
|
|
32
|
+
|
|
33
|
+
<br>
|
|
34
|
+
|
|
35
|
+
<%= link_to 'New Shipment', new_shipment_path %>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<p id="notice"><%= notice %></p>
|
|
2
|
+
|
|
3
|
+
<p>
|
|
4
|
+
<strong>Order line:</strong>
|
|
5
|
+
<%= @shipment.order_line_id %>
|
|
6
|
+
</p>
|
|
7
|
+
|
|
8
|
+
<p>
|
|
9
|
+
<strong>Shipping date:</strong>
|
|
10
|
+
<%= @shipment.shipping_date %>
|
|
11
|
+
</p>
|
|
12
|
+
|
|
13
|
+
<p>
|
|
14
|
+
<strong>Shipping quantity:</strong>
|
|
15
|
+
<%= @shipment.shipping_quantity %>
|
|
16
|
+
</p>
|
|
17
|
+
|
|
18
|
+
<p>
|
|
19
|
+
<strong>Arriving date:</strong>
|
|
20
|
+
<%= @shipment.arriving_date %>
|
|
21
|
+
</p>
|
|
22
|
+
|
|
23
|
+
<p>
|
|
24
|
+
<strong>Status:</strong>
|
|
25
|
+
<%= @shipment.status %>
|
|
26
|
+
</p>
|
|
27
|
+
|
|
28
|
+
<%= link_to 'Edit', edit_shipment_path(@shipment) %> |
|
|
29
|
+
<%= link_to 'Back', shipments_path %>
|
data/spec/dummy/bin/rake
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
|
2
|
+
|
|
3
|
+
# Pick the frameworks you want:
|
|
4
|
+
require "active_record/railtie"
|
|
5
|
+
require "action_controller/railtie"
|
|
6
|
+
require "action_mailer/railtie"
|
|
7
|
+
require "sprockets/railtie"
|
|
8
|
+
# require "rails/test_unit/railtie"
|
|
9
|
+
|
|
10
|
+
Bundler.require(*Rails.groups)
|
|
11
|
+
require "ext_form"
|
|
12
|
+
|
|
13
|
+
module Dummy
|
|
14
|
+
class Application < Rails::Application
|
|
15
|
+
# Settings in config/environments/* take precedence over those specified here.
|
|
16
|
+
# Application configuration should go into files in config/initializers
|
|
17
|
+
# -- all .rb files in that directory are automatically loaded.
|
|
18
|
+
|
|
19
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
|
20
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
|
21
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
|
22
|
+
|
|
23
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
|
24
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
|
25
|
+
# config.i18n.default_locale = :de
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# SQLite version 3.x
|
|
2
|
+
# gem install sqlite3
|
|
3
|
+
#
|
|
4
|
+
# Ensure the SQLite 3 gem is defined in your Gemfile
|
|
5
|
+
# gem 'sqlite3'
|
|
6
|
+
development:
|
|
7
|
+
adapter: sqlite3
|
|
8
|
+
database: db/development.sqlite3
|
|
9
|
+
pool: 5
|
|
10
|
+
timeout: 5000
|
|
11
|
+
|
|
12
|
+
# Warning: The database defined as "test" will be erased and
|
|
13
|
+
# re-generated from your development database when you run "rake".
|
|
14
|
+
# Do not set this db to the same as development or production.
|
|
15
|
+
test:
|
|
16
|
+
adapter: sqlite3
|
|
17
|
+
database: db/test.sqlite3
|
|
18
|
+
pool: 5
|
|
19
|
+
timeout: 5000
|
|
20
|
+
|
|
21
|
+
production:
|
|
22
|
+
adapter: sqlite3
|
|
23
|
+
database: db/production.sqlite3
|
|
24
|
+
pool: 5
|
|
25
|
+
timeout: 5000
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
Dummy::Application.configure do
|
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
|
3
|
+
|
|
4
|
+
# In the development environment your application's code is reloaded on
|
|
5
|
+
# every request. This slows down response time but is perfect for development
|
|
6
|
+
# since you don't have to restart the web server when you make code changes.
|
|
7
|
+
config.cache_classes = false
|
|
8
|
+
|
|
9
|
+
# Do not eager load code on boot.
|
|
10
|
+
config.eager_load = false
|
|
11
|
+
|
|
12
|
+
# Show full error reports and disable caching.
|
|
13
|
+
config.consider_all_requests_local = true
|
|
14
|
+
config.action_controller.perform_caching = false
|
|
15
|
+
|
|
16
|
+
# Don't care if the mailer can't send.
|
|
17
|
+
config.action_mailer.raise_delivery_errors = false
|
|
18
|
+
|
|
19
|
+
# Print deprecation notices to the Rails logger.
|
|
20
|
+
config.active_support.deprecation = :log
|
|
21
|
+
|
|
22
|
+
# Raise an error on page load if there are pending migrations
|
|
23
|
+
config.active_record.migration_error = :page_load
|
|
24
|
+
|
|
25
|
+
# Debug mode disables concatenation and preprocessing of assets.
|
|
26
|
+
# This option may cause significant delays in view rendering with a large
|
|
27
|
+
# number of complex assets.
|
|
28
|
+
config.assets.debug = true
|
|
29
|
+
end
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
Dummy::Application.configure do
|
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
|
3
|
+
|
|
4
|
+
# Code is not reloaded between requests.
|
|
5
|
+
config.cache_classes = true
|
|
6
|
+
|
|
7
|
+
# Eager load code on boot. This eager loads most of Rails and
|
|
8
|
+
# your application in memory, allowing both thread web servers
|
|
9
|
+
# and those relying on copy on write to perform better.
|
|
10
|
+
# Rake tasks automatically ignore this option for performance.
|
|
11
|
+
config.eager_load = true
|
|
12
|
+
|
|
13
|
+
# Full error reports are disabled and caching is turned on.
|
|
14
|
+
config.consider_all_requests_local = false
|
|
15
|
+
config.action_controller.perform_caching = true
|
|
16
|
+
|
|
17
|
+
# Enable Rack::Cache to put a simple HTTP cache in front of your application
|
|
18
|
+
# Add `rack-cache` to your Gemfile before enabling this.
|
|
19
|
+
# For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid.
|
|
20
|
+
# config.action_dispatch.rack_cache = true
|
|
21
|
+
|
|
22
|
+
# Disable Rails's static asset server (Apache or nginx will already do this).
|
|
23
|
+
config.serve_static_assets = false
|
|
24
|
+
|
|
25
|
+
# Compress JavaScripts and CSS.
|
|
26
|
+
config.assets.js_compressor = :uglifier
|
|
27
|
+
# config.assets.css_compressor = :sass
|
|
28
|
+
|
|
29
|
+
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
|
30
|
+
config.assets.compile = false
|
|
31
|
+
|
|
32
|
+
# Generate digests for assets URLs.
|
|
33
|
+
config.assets.digest = true
|
|
34
|
+
|
|
35
|
+
# Version of your assets, change this if you want to expire all your assets.
|
|
36
|
+
config.assets.version = '1.0'
|
|
37
|
+
|
|
38
|
+
# Specifies the header that your server uses for sending files.
|
|
39
|
+
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
|
|
40
|
+
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
|
|
41
|
+
|
|
42
|
+
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
|
43
|
+
# config.force_ssl = true
|
|
44
|
+
|
|
45
|
+
# Set to :debug to see everything in the log.
|
|
46
|
+
config.log_level = :info
|
|
47
|
+
|
|
48
|
+
# Prepend all log lines with the following tags.
|
|
49
|
+
# config.log_tags = [ :subdomain, :uuid ]
|
|
50
|
+
|
|
51
|
+
# Use a different logger for distributed setups.
|
|
52
|
+
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
|
|
53
|
+
|
|
54
|
+
# Use a different cache store in production.
|
|
55
|
+
# config.cache_store = :mem_cache_store
|
|
56
|
+
|
|
57
|
+
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
|
58
|
+
# config.action_controller.asset_host = "http://assets.example.com"
|
|
59
|
+
|
|
60
|
+
# Precompile additional assets.
|
|
61
|
+
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
|
|
62
|
+
# config.assets.precompile += %w( search.js )
|
|
63
|
+
|
|
64
|
+
# Ignore bad email addresses and do not raise email delivery errors.
|
|
65
|
+
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
|
66
|
+
# config.action_mailer.raise_delivery_errors = false
|
|
67
|
+
|
|
68
|
+
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
|
69
|
+
# the I18n.default_locale when a translation can not be found).
|
|
70
|
+
config.i18n.fallbacks = true
|
|
71
|
+
|
|
72
|
+
# Send deprecation notices to registered listeners.
|
|
73
|
+
config.active_support.deprecation = :notify
|
|
74
|
+
|
|
75
|
+
# Disable automatic flushing of the log to improve performance.
|
|
76
|
+
# config.autoflush_log = false
|
|
77
|
+
|
|
78
|
+
# Use default logging formatter so that PID and timestamp are not suppressed.
|
|
79
|
+
config.log_formatter = ::Logger::Formatter.new
|
|
80
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
Dummy::Application.configure do
|
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
|
3
|
+
|
|
4
|
+
# The test environment is used exclusively to run your application's
|
|
5
|
+
# test suite. You never need to work with it otherwise. Remember that
|
|
6
|
+
# your test database is "scratch space" for the test suite and is wiped
|
|
7
|
+
# and recreated between test runs. Don't rely on the data there!
|
|
8
|
+
config.cache_classes = true
|
|
9
|
+
|
|
10
|
+
# Do not eager load code on boot. This avoids loading your whole application
|
|
11
|
+
# just for the purpose of running a single test. If you are using a tool that
|
|
12
|
+
# preloads Rails for running tests, you may have to set it to true.
|
|
13
|
+
config.eager_load = false
|
|
14
|
+
|
|
15
|
+
# Configure static asset server for tests with Cache-Control for performance.
|
|
16
|
+
config.serve_static_assets = true
|
|
17
|
+
config.static_cache_control = "public, max-age=3600"
|
|
18
|
+
|
|
19
|
+
# Show full error reports and disable caching.
|
|
20
|
+
config.consider_all_requests_local = true
|
|
21
|
+
config.action_controller.perform_caching = false
|
|
22
|
+
|
|
23
|
+
# Raise exceptions instead of rendering exception templates.
|
|
24
|
+
config.action_dispatch.show_exceptions = false
|
|
25
|
+
|
|
26
|
+
# Disable request forgery protection in test environment.
|
|
27
|
+
config.action_controller.allow_forgery_protection = false
|
|
28
|
+
|
|
29
|
+
# Tell Action Mailer not to deliver emails to the real world.
|
|
30
|
+
# The :test delivery method accumulates sent emails in the
|
|
31
|
+
# ActionMailer::Base.deliveries array.
|
|
32
|
+
config.action_mailer.delivery_method = :test
|
|
33
|
+
|
|
34
|
+
# Print deprecation notices to the stderr.
|
|
35
|
+
config.active_support.deprecation = :stderr
|
|
36
|
+
end
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
|
2
|
+
|
|
3
|
+
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
|
4
|
+
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
|
5
|
+
|
|
6
|
+
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
|
7
|
+
# Rails.backtrace_cleaner.remove_silencers!
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
|
2
|
+
|
|
3
|
+
# Add new inflection rules using the following format. Inflections
|
|
4
|
+
# are locale specific, and you may define rules for as many different
|
|
5
|
+
# locales as you wish. All of these examples are active by default:
|
|
6
|
+
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
|
7
|
+
# inflect.plural /^(ox)$/i, '\1en'
|
|
8
|
+
# inflect.singular /^(ox)en/i, '\1'
|
|
9
|
+
# inflect.irregular 'person', 'people'
|
|
10
|
+
# inflect.uncountable %w( fish sheep )
|
|
11
|
+
# end
|
|
12
|
+
|
|
13
|
+
# These inflection rules are supported but not enabled by default:
|
|
14
|
+
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
|
15
|
+
# inflect.acronym 'RESTful'
|
|
16
|
+
# end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
|
2
|
+
|
|
3
|
+
# Your secret key is used for verifying the integrity of signed cookies.
|
|
4
|
+
# If you change this key, all old signed cookies will become invalid!
|
|
5
|
+
|
|
6
|
+
# Make sure the secret is at least 30 characters and all random,
|
|
7
|
+
# no regular words or you'll be exposed to dictionary attacks.
|
|
8
|
+
# You can use `rake secret` to generate a secure secret key.
|
|
9
|
+
|
|
10
|
+
# Make sure your secret_key_base is kept private
|
|
11
|
+
# if you're sharing your code publicly.
|
|
12
|
+
Dummy::Application.config.secret_key_base = '12b92b1813f833c7029a35bc97f9810b4eedab7378c65eb7456d7a15480ff68e5baa396f5ea6387fb9c8b60a7b5189f6e31d5ecf8ef63b6285e19630321f6639'
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
# Use this setup block to configure all options available in SimpleForm.
|
|
2
|
+
SimpleForm.setup do |config|
|
|
3
|
+
# Wrappers are used by the form builder to generate a
|
|
4
|
+
# complete input. You can remove any component from the
|
|
5
|
+
# wrapper, change the order or even add your own to the
|
|
6
|
+
# stack. The options given below are used to wrap the
|
|
7
|
+
# whole input.
|
|
8
|
+
config.wrappers :default, class: :input,
|
|
9
|
+
hint_class: :field_with_hint, error_class: :field_with_errors do |b|
|
|
10
|
+
## Extensions enabled by default
|
|
11
|
+
# Any of these extensions can be disabled for a
|
|
12
|
+
# given input by passing: `f.input EXTENSION_NAME => false`.
|
|
13
|
+
# You can make any of these extensions optional by
|
|
14
|
+
# renaming `b.use` to `b.optional`.
|
|
15
|
+
|
|
16
|
+
# Determines whether to use HTML5 (:email, :url, ...)
|
|
17
|
+
# and required attributes
|
|
18
|
+
b.use :html5
|
|
19
|
+
|
|
20
|
+
# Calculates placeholders automatically from I18n
|
|
21
|
+
# You can also pass a string as f.input placeholder: "Placeholder"
|
|
22
|
+
b.use :placeholder
|
|
23
|
+
|
|
24
|
+
## Optional extensions
|
|
25
|
+
# They are disabled unless you pass `f.input EXTENSION_NAME => :lookup`
|
|
26
|
+
# to the input. If so, they will retrieve the values from the model
|
|
27
|
+
# if any exists. If you want to enable the lookup for any of those
|
|
28
|
+
# extensions by default, you can change `b.optional` to `b.use`.
|
|
29
|
+
|
|
30
|
+
# Calculates maxlength from length validations for string inputs
|
|
31
|
+
b.optional :maxlength
|
|
32
|
+
|
|
33
|
+
# Calculates pattern from format validations for string inputs
|
|
34
|
+
b.optional :pattern
|
|
35
|
+
|
|
36
|
+
# Calculates min and max from length validations for numeric inputs
|
|
37
|
+
b.optional :min_max
|
|
38
|
+
|
|
39
|
+
# Calculates readonly automatically from readonly attributes
|
|
40
|
+
b.optional :readonly
|
|
41
|
+
|
|
42
|
+
## Inputs
|
|
43
|
+
b.use :label_input
|
|
44
|
+
b.use :hint, wrap_with: { tag: :span, class: :hint }
|
|
45
|
+
b.use :error, wrap_with: { tag: :span, class: :error }
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# The default wrapper to be used by the FormBuilder.
|
|
49
|
+
config.default_wrapper = :default
|
|
50
|
+
|
|
51
|
+
# Define the way to render check boxes / radio buttons with labels.
|
|
52
|
+
# Defaults to :nested for bootstrap config.
|
|
53
|
+
# inline: input + label
|
|
54
|
+
# nested: label > input
|
|
55
|
+
config.boolean_style = :nested
|
|
56
|
+
|
|
57
|
+
# Default class for buttons
|
|
58
|
+
config.button_class = 'btn'
|
|
59
|
+
|
|
60
|
+
# Method used to tidy up errors. Specify any Rails Array method.
|
|
61
|
+
# :first lists the first message for each field.
|
|
62
|
+
# Use :to_sentence to list all errors for each field.
|
|
63
|
+
# config.error_method = :first
|
|
64
|
+
|
|
65
|
+
# Default tag used for error notification helper.
|
|
66
|
+
config.error_notification_tag = :div
|
|
67
|
+
|
|
68
|
+
# CSS class to add for error notification helper.
|
|
69
|
+
config.error_notification_class = 'alert alert-error'
|
|
70
|
+
|
|
71
|
+
# ID to add for error notification helper.
|
|
72
|
+
# config.error_notification_id = nil
|
|
73
|
+
|
|
74
|
+
# Series of attempts to detect a default label method for collection.
|
|
75
|
+
# config.collection_label_methods = [ :to_label, :name, :title, :to_s ]
|
|
76
|
+
|
|
77
|
+
# Series of attempts to detect a default value method for collection.
|
|
78
|
+
# config.collection_value_methods = [ :id, :to_s ]
|
|
79
|
+
|
|
80
|
+
# You can wrap a collection of radio/check boxes in a pre-defined tag, defaulting to none.
|
|
81
|
+
# config.collection_wrapper_tag = nil
|
|
82
|
+
|
|
83
|
+
# You can define the class to use on all collection wrappers. Defaulting to none.
|
|
84
|
+
# config.collection_wrapper_class = nil
|
|
85
|
+
|
|
86
|
+
# You can wrap each item in a collection of radio/check boxes with a tag,
|
|
87
|
+
# defaulting to :span. Please note that when using :boolean_style = :nested,
|
|
88
|
+
# SimpleForm will force this option to be a label.
|
|
89
|
+
# config.item_wrapper_tag = :span
|
|
90
|
+
|
|
91
|
+
# You can define a class to use in all item wrappers. Defaulting to none.
|
|
92
|
+
# config.item_wrapper_class = nil
|
|
93
|
+
|
|
94
|
+
# How the label text should be generated altogether with the required text.
|
|
95
|
+
# config.label_text = lambda { |label, required| "#{required} #{label}" }
|
|
96
|
+
|
|
97
|
+
# You can define the class to use on all labels. Default is nil.
|
|
98
|
+
config.label_class = 'control-label'
|
|
99
|
+
|
|
100
|
+
# You can define the class to use on all forms. Default is simple_form.
|
|
101
|
+
# config.form_class = :simple_form
|
|
102
|
+
|
|
103
|
+
# You can define which elements should obtain additional classes
|
|
104
|
+
# config.generate_additional_classes_for = [:wrapper, :label, :input]
|
|
105
|
+
|
|
106
|
+
# Whether attributes are required by default (or not). Default is true.
|
|
107
|
+
# config.required_by_default = true
|
|
108
|
+
|
|
109
|
+
# Tell browsers whether to use the native HTML5 validations (novalidate form option).
|
|
110
|
+
# These validations are enabled in SimpleForm's internal config but disabled by default
|
|
111
|
+
# in this configuration, which is recommended due to some quirks from different browsers.
|
|
112
|
+
# To stop SimpleForm from generating the novalidate option, enabling the HTML5 validations,
|
|
113
|
+
# change this configuration to true.
|
|
114
|
+
config.browser_validations = false
|
|
115
|
+
|
|
116
|
+
# Collection of methods to detect if a file type was given.
|
|
117
|
+
# config.file_methods = [ :mounted_as, :file?, :public_filename ]
|
|
118
|
+
|
|
119
|
+
# Custom mappings for input types. This should be a hash containing a regexp
|
|
120
|
+
# to match as key, and the input type that will be used when the field name
|
|
121
|
+
# matches the regexp as value.
|
|
122
|
+
# config.input_mappings = { /count/ => :integer }
|
|
123
|
+
|
|
124
|
+
# Custom wrappers for input types. This should be a hash containing an input
|
|
125
|
+
# type as key and the wrapper that will be used for all inputs with specified type.
|
|
126
|
+
# config.wrapper_mappings = { string: :prepend }
|
|
127
|
+
|
|
128
|
+
# Default priority for time_zone inputs.
|
|
129
|
+
# config.time_zone_priority = nil
|
|
130
|
+
|
|
131
|
+
# Default priority for country inputs.
|
|
132
|
+
# config.country_priority = nil
|
|
133
|
+
|
|
134
|
+
# When false, do not use translations for labels.
|
|
135
|
+
# config.translate_labels = true
|
|
136
|
+
|
|
137
|
+
# Automatically discover new inputs in Rails' autoload path.
|
|
138
|
+
# config.inputs_discovery = true
|
|
139
|
+
|
|
140
|
+
# Cache SimpleForm inputs discovery
|
|
141
|
+
# config.cache_discovery = !Rails.env.development?
|
|
142
|
+
|
|
143
|
+
# Default class for inputs
|
|
144
|
+
# config.input_class = nil
|
|
145
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
|
2
|
+
|
|
3
|
+
# This file contains settings for ActionController::ParamsWrapper which
|
|
4
|
+
# is enabled by default.
|
|
5
|
+
|
|
6
|
+
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
|
7
|
+
ActiveSupport.on_load(:action_controller) do
|
|
8
|
+
wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# To enable root element in JSON for ActiveRecord objects.
|
|
12
|
+
# ActiveSupport.on_load(:active_record) do
|
|
13
|
+
# self.include_root_in_json = true
|
|
14
|
+
# end
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Use this setup block to configure all options available in SimpleForm.
|
|
2
|
+
SimpleForm.setup do |config|
|
|
3
|
+
# Wrappers are used by the form builder to generate a
|
|
4
|
+
# complete input. You can remove any component from the
|
|
5
|
+
# wrapper, change the order or even add your own to the
|
|
6
|
+
# stack. The options given below are used to wrap the
|
|
7
|
+
# whole input.
|
|
8
|
+
config.wrappers :ext, class: 'ext-default-form',
|
|
9
|
+
hint_class: :field_with_hint, error_class: :error do |b|
|
|
10
|
+
## Extensions enabled by default
|
|
11
|
+
# Any of these extensions can be disabled for a
|
|
12
|
+
# given input by passing: `f.input EXTENSION_NAME => false`.
|
|
13
|
+
# You can make any of these extensions optional by
|
|
14
|
+
# renaming `b.use` to `b.optional`.
|
|
15
|
+
|
|
16
|
+
# Determines whether to use HTML5 (:email, :url, ...)
|
|
17
|
+
# and required attributes
|
|
18
|
+
b.use :html5
|
|
19
|
+
|
|
20
|
+
# Calculates placeholders automatically from I18n
|
|
21
|
+
# You can also pass a string as f.input placeholder: "Placeholder"
|
|
22
|
+
b.use :placeholder
|
|
23
|
+
|
|
24
|
+
## Optional extensions
|
|
25
|
+
# They are disabled unless you pass `f.input EXTENSION_NAME => :lookup`
|
|
26
|
+
# to the input. If so, they will retrieve the values from the model
|
|
27
|
+
# if any exists. If you want to enable the lookup for any of those
|
|
28
|
+
# extensions by default, you can change `b.optional` to `b.use`.
|
|
29
|
+
|
|
30
|
+
# Calculates maxlength from length validations for string inputs
|
|
31
|
+
b.optional :maxlength
|
|
32
|
+
|
|
33
|
+
# Calculates pattern from format validations for string inputs
|
|
34
|
+
b.optional :pattern
|
|
35
|
+
|
|
36
|
+
# Calculates min and max from length validations for numeric inputs
|
|
37
|
+
b.optional :min_max
|
|
38
|
+
|
|
39
|
+
# Calculates readonly automatically from readonly attributes
|
|
40
|
+
b.optional :readonly
|
|
41
|
+
|
|
42
|
+
b.wrapper 'div_label', tag: 'div', layout: 'label' do |ba|
|
|
43
|
+
ba.use :label
|
|
44
|
+
end
|
|
45
|
+
## Inputs
|
|
46
|
+
b.wrapper 'input', tag: 'div', layout: 'input' do |ba|
|
|
47
|
+
ba.use :input
|
|
48
|
+
ba.use :error, wrap_with: {tag: 'p', class: 'help-block'}
|
|
49
|
+
ba.use :hint, wrap_with: {tag: 'p', class: 'help-block'}
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
config.label_class = 'ext-form-label'
|
|
54
|
+
config.collection_value_methods = [:id, :to_value, :to_s]
|
|
55
|
+
# config.default_wrapper = :ext
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
ExtForm.setup do |e|
|
|
59
|
+
# Layout manager, default value: 'DefaultLayout'
|
|
60
|
+
# e.layout = 'BootstrapLayout'
|
|
61
|
+
e.layout = 'DefaultLayout'
|
|
62
|
+
e.default_wrapper = :ext
|
|
63
|
+
e.default_layout = {
|
|
64
|
+
layout: '1:1',
|
|
65
|
+
spacing: '10',
|
|
66
|
+
label_width: '15',
|
|
67
|
+
max_width: '100',
|
|
68
|
+
measure: '%'
|
|
69
|
+
}
|
|
70
|
+
end
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Use this setup block to configure all options available in SimpleForm.
|
|
2
|
+
SimpleForm.setup do |config|
|
|
3
|
+
config.wrappers :ext_bootstrap, tag: 'div', class: 'control-group ext-form-group', error_class: 'error' do |b|
|
|
4
|
+
b.use :html5
|
|
5
|
+
b.use :placeholder
|
|
6
|
+
|
|
7
|
+
b.wrapper 'div_label', tag: 'div', layout: 'label' do |bb|
|
|
8
|
+
bb.use :label, class: 'ext-form-label'
|
|
9
|
+
end
|
|
10
|
+
b.wrapper 'input', tag: 'div', layout: 'input' do |bb|
|
|
11
|
+
bb.use :input
|
|
12
|
+
bb.use :error, wrap_with: {tag: 'span', class: 'help-inline'}
|
|
13
|
+
bb.use :hint, wrap_with: {tag: 'p', class: 'help-block text-info'}
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
config.wrappers :ext_datetimepicker, tag: 'div', class: 'control-group ext-form-group', error_class: 'error' do |b|
|
|
19
|
+
b.use :html5
|
|
20
|
+
b.use :placeholder
|
|
21
|
+
|
|
22
|
+
b.wrapper 'div_label', tag: 'div', layout: 'label' do |bb|
|
|
23
|
+
bb.use :label, class: 'ext-form-label'
|
|
24
|
+
end
|
|
25
|
+
b.wrapper 'input', tag: 'div', layout: 'input' do |bb|
|
|
26
|
+
bb.wrapper tag: 'div', class: 'input-append' do |append|
|
|
27
|
+
append.use :input
|
|
28
|
+
append.use :input_addon
|
|
29
|
+
end
|
|
30
|
+
bb.use :error, wrap_with: {tag: 'span', class: 'help-inline'}
|
|
31
|
+
bb.use :hint, wrap_with: {tag: 'p', class: 'help-block text-info'}
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
# Wrappers for forms and inputs using the Twitter Bootstrap toolkit.
|
|
35
|
+
# Check the Bootstrap docs (http://twitter.github.com/bootstrap)
|
|
36
|
+
# to learn about the different styles for forms and inputs,
|
|
37
|
+
# buttons and other elements.
|
|
38
|
+
# config.default_wrapper = :ext_bootstrap
|
|
39
|
+
|
|
40
|
+
config.input_mappings = {/_date$/ => :date_picker,
|
|
41
|
+
/_time$/ => :dt_picker,
|
|
42
|
+
/_at$/ => :dt_picker}
|
|
43
|
+
|
|
44
|
+
config.wrapper_mappings = { dt_picker: :ext_datetimepicker,
|
|
45
|
+
date_picker: :ext_datetimepicker,
|
|
46
|
+
time_picker: :ext_datetimepicker }
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
ExtForm.setup do |e|
|
|
50
|
+
e.layout = 'BootstrapLayout'
|
|
51
|
+
e.default_wrapper = :ext_bootstrap
|
|
52
|
+
e.default_layout = {
|
|
53
|
+
layout: '1:1',
|
|
54
|
+
spacing: '1',
|
|
55
|
+
label_width: '2',
|
|
56
|
+
max_width: '12'
|
|
57
|
+
}
|
|
58
|
+
e.locale = 'zh-CN'
|
|
59
|
+
end
|