web_admin 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +11 -0
- data/.rspec +2 -0
- data/.ruby-version +1 -0
- data/Gemfile +32 -0
- data/Gemfile.lock +335 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +3 -0
- data/Rakefile +22 -0
- data/app/assets/images/web_admin/.keep +0 -0
- data/app/assets/images/web_admin/avatar.jpg +0 -0
- data/app/assets/images/web_admin/first_icon.png +0 -0
- data/app/assets/images/web_admin/render-1-thumb.jpg +0 -0
- data/app/assets/images/web_admin/render-1.jpg +0 -0
- data/app/assets/images/web_admin/render-2-thumb.jpg +0 -0
- data/app/assets/images/web_admin/render-2.jpg +0 -0
- data/app/assets/images/web_admin/render-3-thumb.jpg +0 -0
- data/app/assets/images/web_admin/render-3.jpg +0 -0
- data/app/assets/images/web_admin/render-4-thumb.jpg +0 -0
- data/app/assets/images/web_admin/render-4.jpg +0 -0
- data/app/assets/images/web_admin/responsive.png +0 -0
- data/app/assets/javascripts/web_admin/app.data.js +336 -0
- data/app/assets/javascripts/web_admin/app.js +172 -0
- data/app/assets/javascripts/web_admin/app.plugin.js +220 -0
- data/app/assets/javascripts/web_admin/application.js +20 -0
- data/app/assets/javascripts/web_admin/bootstrap-filestyle.min.js +1 -0
- data/app/assets/javascripts/web_admin/bootstrap.js +1951 -0
- data/app/assets/javascripts/web_admin/charts/easypiechart/jquery.easy-pie-chart.js +184 -0
- data/app/assets/javascripts/web_admin/charts/sparkline/jquery.sparkline.min.js +5 -0
- data/app/assets/javascripts/web_admin/combodate/combodate.js +453 -0
- data/app/assets/javascripts/web_admin/combodate/moment.min.js +6 -0
- data/app/assets/javascripts/web_admin/data/datagrid.json +1900 -0
- data/app/assets/javascripts/web_admin/data/datatable.json +401 -0
- data/app/assets/javascripts/web_admin/datatables/jquery.dataTables.min.js +155 -0
- data/app/assets/javascripts/web_admin/datepicker/bootstrap-datepicker.js +474 -0
- data/app/assets/javascripts/web_admin/datepicker.js +3 -0
- data/app/assets/javascripts/web_admin/fuelux/fuelux.js +1645 -0
- data/app/assets/javascripts/web_admin/fullcalendar/fullcalendar.min.js +7 -0
- data/app/assets/javascripts/web_admin/grid/gallery.js +14 -0
- data/app/assets/javascripts/web_admin/grid/jquery.grid-a-licious.min.js +15 -0
- data/app/assets/javascripts/web_admin/grid/masonry.pkgd.min.js +9 -0
- data/app/assets/javascripts/web_admin/ie/excanvas.js +924 -0
- data/app/assets/javascripts/web_admin/ie/html5.js +9 -0
- data/app/assets/javascripts/web_admin/ie/respond.min.js +6 -0
- data/app/assets/javascripts/web_admin/jquery-ui-1.10.3.custom.min.js +6 -0
- data/app/assets/javascripts/web_admin/jquery.datetimepicker.js +1851 -0
- data/app/assets/javascripts/web_admin/jquery.ui.touch-punch.min.js +11 -0
- data/app/assets/javascripts/web_admin/parsley/parsley.min.js +35 -0
- data/app/assets/javascripts/web_admin/prettyphoto/default/default_thumb.png +0 -0
- data/app/assets/javascripts/web_admin/prettyphoto/default/loader.gif +0 -0
- data/app/assets/javascripts/web_admin/prettyphoto/default/sprite.png +0 -0
- data/app/assets/javascripts/web_admin/prettyphoto/default/sprite_next.png +0 -0
- data/app/assets/javascripts/web_admin/prettyphoto/default/sprite_prev.png +0 -0
- data/app/assets/javascripts/web_admin/prettyphoto/default/sprite_x.png +0 -0
- data/app/assets/javascripts/web_admin/prettyphoto/default/sprite_y.png +0 -0
- data/app/assets/javascripts/web_admin/prettyphoto/jquery.prettyPhoto.js +7 -0
- data/app/assets/javascripts/web_admin/prettyphoto/prettyPhoto.css +170 -0
- data/app/assets/javascripts/web_admin/select2/select2.css +652 -0
- data/app/assets/javascripts/web_admin/select2/select2.min.js +22 -0
- data/app/assets/javascripts/web_admin/slider/bootstrap-slider.js +388 -0
- data/app/assets/javascripts/web_admin/underscore-min.js +7 -0
- data/app/assets/javascripts/web_admin/underscore-min.map +1 -0
- data/app/assets/javascripts/web_admin/upload_image.js +39 -0
- data/app/assets/stylesheets/web_admin/application.css +15 -0
- data/app/assets/stylesheets/web_admin/bootstrap.css +5784 -0
- data/app/assets/stylesheets/web_admin/font-awesome.min.css +4 -0
- data/app/assets/stylesheets/web_admin/font.css +18 -0
- data/app/assets/stylesheets/web_admin/fonts/FontAwesome.otf +0 -0
- data/app/assets/stylesheets/web_admin/fonts/fontawesome-webfont.eot +0 -0
- data/app/assets/stylesheets/web_admin/fonts/fontawesome-webfont.svg +414 -0
- data/app/assets/stylesheets/web_admin/fonts/fontawesome-webfont.ttf +0 -0
- data/app/assets/stylesheets/web_admin/fonts/fontawesome-webfont.woff +0 -0
- data/app/assets/stylesheets/web_admin/fonts/glyphicons-halflings-regular.eot +0 -0
- data/app/assets/stylesheets/web_admin/fonts/glyphicons-halflings-regular.svg +229 -0
- data/app/assets/stylesheets/web_admin/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/app/assets/stylesheets/web_admin/fonts/glyphicons-halflings-regular.woff +0 -0
- data/app/assets/stylesheets/web_admin/fonts/opensans/opensans-bold-webfont.woff +0 -0
- data/app/assets/stylesheets/web_admin/fonts/opensans/opensans-light-webfont.woff +0 -0
- data/app/assets/stylesheets/web_admin/fonts/opensans/opensans-webfont.woff +0 -0
- data/app/assets/stylesheets/web_admin/landing.css +272 -0
- data/app/assets/stylesheets/web_admin/plugin.css +1132 -0
- data/app/assets/stylesheets/web_admin/style.css +613 -0
- data/app/assets/stylesheets/web_admin/style2.css +21 -0
- data/app/controllers/web_admin/albums_controller.rb +8 -0
- data/app/controllers/web_admin/application_controller.rb +10 -0
- data/app/controllers/web_admin/crud_controller.rb +61 -0
- data/app/controllers/web_admin/events_controller.rb +9 -0
- data/app/controllers/web_admin/images_controller.rb +8 -0
- data/app/controllers/web_admin/institutionals_controller.rb +8 -0
- data/app/controllers/web_admin/main_controller.rb +7 -0
- data/app/controllers/web_admin/posts_controller.rb +19 -0
- data/app/controllers/web_admin/users_controller.rb +15 -0
- data/app/controllers/web_admin/videos_controller.rb +8 -0
- data/app/enumerations/web_admin/permission_type.rb +5 -0
- data/app/enumerations/web_admin/user_type.rb +6 -0
- data/app/helpers/web_admin/application_helper.rb +20 -0
- data/app/models/ability.rb +14 -0
- data/app/models/ckeditor/asset.rb +7 -0
- data/app/models/ckeditor/attachment_file.rb +7 -0
- data/app/models/ckeditor/picture.rb +7 -0
- data/app/models/web_admin/album.rb +13 -0
- data/app/models/web_admin/event.rb +20 -0
- data/app/models/web_admin/image.rb +10 -0
- data/app/models/web_admin/institutional.rb +11 -0
- data/app/models/web_admin/permission.rb +9 -0
- data/app/models/web_admin/post.rb +14 -0
- data/app/models/web_admin/user.rb +25 -0
- data/app/models/web_admin/video.rb +17 -0
- data/app/uploaders/ckeditor_attachment_file_uploader.rb +36 -0
- data/app/uploaders/ckeditor_picture_uploader.rb +47 -0
- data/app/uploaders/web_admin/image_post_uploader.rb +55 -0
- data/app/uploaders/web_admin/image_uploader.rb +52 -0
- data/app/views/devise/confirmations/new.html.erb +12 -0
- data/app/views/devise/mailer/confirmation_instructions.html.erb +5 -0
- data/app/views/devise/mailer/reset_password_instructions.html.erb +8 -0
- data/app/views/devise/mailer/unlock_instructions.html.erb +7 -0
- data/app/views/devise/passwords/edit.html.erb +16 -0
- data/app/views/devise/passwords/new.html.erb +12 -0
- data/app/views/devise/registrations/edit.html.erb +29 -0
- data/app/views/devise/registrations/new.html.erb +18 -0
- data/app/views/devise/sessions/new.html.erb +16 -0
- data/app/views/devise/shared/_links.html.erb +25 -0
- data/app/views/devise/unlocks/new.html.erb +12 -0
- data/app/views/layouts/web_admin/devise.html.erb +42 -0
- data/app/views/shared/403.html +57 -0
- data/app/views/shared/_header.html.erb +16 -0
- data/app/views/shared/_navbar.html.erb +23 -0
- data/app/views/shared/_notice.html.erb +12 -0
- data/app/views/web_admin/albums/_form.html.erb +23 -0
- data/app/views/web_admin/albums/edit.html.erb +4 -0
- data/app/views/web_admin/albums/index.html.erb +39 -0
- data/app/views/web_admin/albums/new.html.erb +4 -0
- data/app/views/web_admin/albums/show.html.erb +4 -0
- data/app/views/web_admin/events/_form.html.erb +37 -0
- data/app/views/web_admin/events/edit.html.erb +4 -0
- data/app/views/web_admin/events/index.html.erb +39 -0
- data/app/views/web_admin/events/new.html.erb +4 -0
- data/app/views/web_admin/images/_form.html.erb +23 -0
- data/app/views/web_admin/images/_images.html.erb +10 -0
- data/app/views/web_admin/images/create.js.erb +2 -0
- data/app/views/web_admin/images/update.js.erb +2 -0
- data/app/views/web_admin/institutionals/_form.html.erb +22 -0
- data/app/views/web_admin/institutionals/edit.html.erb +4 -0
- data/app/views/web_admin/institutionals/index.html.erb +35 -0
- data/app/views/web_admin/institutionals/new.html.erb +4 -0
- data/app/views/web_admin/layouts/application.html.erb +77 -0
- data/app/views/web_admin/main/index.html.erb +1 -0
- data/app/views/web_admin/posts/_form.html.erb +27 -0
- data/app/views/web_admin/posts/edit.html.erb +4 -0
- data/app/views/web_admin/posts/index.html.erb +37 -0
- data/app/views/web_admin/posts/new.html.erb +4 -0
- data/app/views/web_admin/users/_form.html.erb +49 -0
- data/app/views/web_admin/users/edit.html.erb +4 -0
- data/app/views/web_admin/users/index.html.erb +35 -0
- data/app/views/web_admin/users/new.html.erb +4 -0
- data/app/views/web_admin/videos/_form.html.erb +22 -0
- data/app/views/web_admin/videos/edit.html.erb +4 -0
- data/app/views/web_admin/videos/index.html.erb +37 -0
- data/app/views/web_admin/videos/new.html.erb +4 -0
- data/bin/rails +12 -0
- data/config/initializers/ckeditor.rb +39 -0
- data/config/initializers/devise.rb +261 -0
- data/config/initializers/enumerate_it.rb +1 -0
- data/config/initializers/simple_form.rb +145 -0
- data/config/initializers/simple_form_bootstrap.rb +46 -0
- data/config/locales/buttons.yml +3 -0
- data/config/locales/controllers.yml +9 -0
- data/config/locales/devise.en.yml +62 -0
- data/config/locales/devise.pt.yml +62 -0
- data/config/locales/models.yml +54 -0
- data/config/locales/rails.yml +219 -0
- data/config/locales/responders.yml +10 -0
- data/config/locales/simple_form.en.yml +26 -0
- data/config/routes.rb +13 -0
- data/db/migrate/20141023223026_devise_create_admin_web_users.rb +42 -0
- data/db/migrate/20141023223656_create_admin_web_posts.rb +15 -0
- data/db/migrate/20141026181117_create_ckeditor_assets.rb +26 -0
- data/db/migrate/20141028020102_create_admin_web_institutionals.rb +10 -0
- data/db/migrate/20141028135201_create_admin_web_videos.rb +10 -0
- data/db/migrate/20141114020551_create_admin_web_albums.rb +12 -0
- data/db/migrate/20141117183405_create_admin_web_images.rb +11 -0
- data/db/migrate/20141130203155_add_user_type_to_users.rb +5 -0
- data/db/migrate/20141224221959_create_admin_web_events.rb +18 -0
- data/db/migrate/20150130140502_create_admin_web_permissions.rb +13 -0
- data/db/migrate/20150510191213_rename_tables.rb +12 -0
- data/lib/application_responder.rb +12 -0
- data/lib/tasks/web_admin_tasks.rake +4 -0
- data/lib/templates/erb/scaffold/_form.html.erb +13 -0
- data/lib/web_admin/engine.rb +15 -0
- data/lib/web_admin/version.rb +3 -0
- data/lib/web_admin.rb +18 -0
- data/spec/factories/admin_web_users.rb +24 -0
- data/spec/features/admin_web/albums_spec.rb +74 -0
- data/spec/features/admin_web/event_spec.rb +85 -0
- data/spec/features/admin_web/institutionals_spec.rb +47 -0
- data/spec/features/admin_web/login_spec.rb +18 -0
- data/spec/features/admin_web/permissions_spec.rb +40 -0
- data/spec/features/admin_web/posts_spec.rb +55 -0
- data/spec/features/admin_web/users_spec.rb +73 -0
- data/spec/features/admin_web/videos_spec.rb +51 -0
- data/spec/fixtures/p3-single.jpg +0 -0
- data/spec/models/admin_web/album_spec.rb +20 -0
- data/spec/models/admin_web/event_spec.rb +42 -0
- data/spec/models/admin_web/image_spec.rb +14 -0
- data/spec/models/admin_web/institutional_spec.rb +19 -0
- data/spec/models/admin_web/permission_spec.rb +14 -0
- data/spec/models/admin_web/post_spec.rb +25 -0
- data/spec/models/admin_web/user_spec.rb +18 -0
- data/spec/models/admin_web/video_spec.rb +26 -0
- data/spec/rails_helper.rb +52 -0
- data/spec/spec_helper.rb +85 -0
- data/spec/support/capybara.rb +53 -0
- data/spec/support/database_cleaner.rb +25 -0
- data/spec/support/devise.rb +5 -0
- data/spec/support/factory_girl.rb +4 -0
- data/spec/support/helpers.rb +82 -0
- data/spec/support/shared_connection.rb +10 -0
- data/spec/test_app/README.rdoc +28 -0
- data/spec/test_app/Rakefile +6 -0
- data/spec/test_app/app/assets/images/.keep +0 -0
- data/spec/test_app/app/assets/javascripts/application.js +13 -0
- data/spec/test_app/app/assets/stylesheets/application.css +15 -0
- data/spec/test_app/app/controllers/application_controller.rb +5 -0
- data/spec/test_app/app/controllers/concerns/.keep +0 -0
- data/spec/test_app/app/helpers/application_helper.rb +2 -0
- data/spec/test_app/app/mailers/.keep +0 -0
- data/spec/test_app/app/models/.keep +0 -0
- data/spec/test_app/app/models/concerns/.keep +0 -0
- data/spec/test_app/app/views/layouts/application.html.erb +14 -0
- data/spec/test_app/bin/bundle +3 -0
- data/spec/test_app/bin/rails +4 -0
- data/spec/test_app/bin/rake +4 -0
- data/spec/test_app/config/application.rb +29 -0
- data/spec/test_app/config/boot.rb +5 -0
- data/spec/test_app/config/database.yml +85 -0
- data/spec/test_app/config/environment.rb +5 -0
- data/spec/test_app/config/environments/development.rb +37 -0
- data/spec/test_app/config/environments/production.rb +78 -0
- data/spec/test_app/config/environments/test.rb +39 -0
- data/spec/test_app/config/initializers/assets.rb +8 -0
- data/spec/test_app/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/test_app/config/initializers/cookies_serializer.rb +3 -0
- data/spec/test_app/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/test_app/config/initializers/inflections.rb +16 -0
- data/spec/test_app/config/initializers/mime_types.rb +4 -0
- data/spec/test_app/config/initializers/session_store.rb +3 -0
- data/spec/test_app/config/initializers/wrap_parameters.rb +14 -0
- data/spec/test_app/config/locales/en.yml +23 -0
- data/spec/test_app/config/routes.rb +4 -0
- data/spec/test_app/config/secrets.yml +22 -0
- data/spec/test_app/config.ru +4 -0
- data/spec/test_app/db/schema.rb +121 -0
- data/spec/test_app/lib/assets/.keep +0 -0
- data/spec/test_app/log/.keep +0 -0
- data/spec/test_app/public/404.html +67 -0
- data/spec/test_app/public/422.html +67 -0
- data/spec/test_app/public/500.html +66 -0
- data/spec/test_app/public/favicon.ico +0 -0
- data/spec/test_app/spec/factories/admin_web_albums.rb +7 -0
- data/spec/test_app/spec/factories/admin_web_users.rb +24 -0
- data/spec/test_app/spec/factories/permissions.rb +36 -0
- data/web_admin.gemspec +38 -0
- data/wercker.yml +16 -0
- metadata +530 -0
@@ -0,0 +1,49 @@
|
|
1
|
+
<div class="row">
|
2
|
+
<div class="col-md-12">
|
3
|
+
<div class="panel">
|
4
|
+
<div class="panel-body">
|
5
|
+
<%= simple_form_for @object, html: { class: "form-horizontal", role: "form"} do |f| %>
|
6
|
+
|
7
|
+
<%= f.input :email %>
|
8
|
+
|
9
|
+
<%= f.input :password %>
|
10
|
+
|
11
|
+
<%= f.input :password_confirmation %>
|
12
|
+
|
13
|
+
<table class="table table-striped">
|
14
|
+
<thead>
|
15
|
+
<tr>
|
16
|
+
<td>Menu</td>
|
17
|
+
<td>Operação</td>
|
18
|
+
</tr>
|
19
|
+
</thead>
|
20
|
+
|
21
|
+
<tbody>
|
22
|
+
<%= f.simple_fields_for :permissions do |permission| %>
|
23
|
+
<tr>
|
24
|
+
<td>
|
25
|
+
<%= I18n.t("controllers.#{permission.object.model}") %>
|
26
|
+
<%= permission.input :model, as: :hidden, value: permission.object.model %>
|
27
|
+
</td>
|
28
|
+
<td><%= permission.input :permission_type, as: :select, collection: WebAdmin::PermissionType.to_a, label: false %></td>
|
29
|
+
</tr>
|
30
|
+
<% end %>
|
31
|
+
</tbody>
|
32
|
+
</table>
|
33
|
+
|
34
|
+
<hr>
|
35
|
+
<div class="form-actions">
|
36
|
+
<%= f.submit 'Salvar', class: "btn btn-success" %>
|
37
|
+
<%= link_to 'Apagar', @object, method: :delete, data: {confirm: 'Tem certeza que deseja remover esse registro?'}, class: 'btn btn-danger' if f.object.persisted? %>
|
38
|
+
<% if can? :read, WebAdmin::User %>
|
39
|
+
<%= link_to 'Cancelar', users_path, class: 'btn btn-primary' %>
|
40
|
+
<% else %>
|
41
|
+
<%= link_to 'Cancelar', root_path, class: 'btn btn-primary' %>
|
42
|
+
<% end %>
|
43
|
+
</div>
|
44
|
+
<% end %>
|
45
|
+
</div>
|
46
|
+
</div>
|
47
|
+
|
48
|
+
</div>
|
49
|
+
</div>
|
@@ -0,0 +1,35 @@
|
|
1
|
+
<div class="row">
|
2
|
+
<div class="col-md-8">
|
3
|
+
<h4>Cadastro de usuários</h4>
|
4
|
+
|
5
|
+
<% if can? :create, WebAdmin::User %>
|
6
|
+
<div class="row">
|
7
|
+
<div class="col-md-12"><%= link_to 'Novo', new_user_path, class: 'btn btn-primary link-new' %></div>
|
8
|
+
</div>
|
9
|
+
<% end %>
|
10
|
+
|
11
|
+
<div class="table-responsive">
|
12
|
+
<table class="table table-hover">
|
13
|
+
<thead>
|
14
|
+
<tr>
|
15
|
+
<td>Email</td>
|
16
|
+
<td>Criado em</td>
|
17
|
+
</tr>
|
18
|
+
</thead>
|
19
|
+
|
20
|
+
<tbody>
|
21
|
+
<% @users.each do |user| %>
|
22
|
+
<tr>
|
23
|
+
<td><%= link_to user.email, edit_user_path(user) %></td>
|
24
|
+
<td><%= I18n.l user.created_at, format: :only_date %></td>
|
25
|
+
</tr>
|
26
|
+
<% end %>
|
27
|
+
</tbody>
|
28
|
+
</table>
|
29
|
+
</div>
|
30
|
+
</div>
|
31
|
+
|
32
|
+
<div class="col-md-4 box">
|
33
|
+
<h4>Pesquisa</h4>
|
34
|
+
</div>
|
35
|
+
</div>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<div class="row">
|
2
|
+
<div class="col-md-12">
|
3
|
+
<div class="panel">
|
4
|
+
<div class="panel-body">
|
5
|
+
<%= simple_form_for @object, html: { class: "form-horizontal", role: "form"} do |f| %>
|
6
|
+
|
7
|
+
<%= f.input :description %>
|
8
|
+
|
9
|
+
<%= f.input :link %>
|
10
|
+
|
11
|
+
<hr>
|
12
|
+
<div class="form-actions">
|
13
|
+
<%= f.submit 'Salvar', class: "btn btn-success" %>
|
14
|
+
<%= link_to 'Apagar', @object, method: :delete, data: {confirm: 'Tem certeza que deseja remover esse registro?'}, class: 'btn btn-danger' if f.object.persisted? %>
|
15
|
+
<%= link_to 'Cancelar', videos_path, class: 'btn btn-primary' %>
|
16
|
+
</div>
|
17
|
+
<% end %>
|
18
|
+
</div>
|
19
|
+
</div>
|
20
|
+
|
21
|
+
</div>
|
22
|
+
</div>
|
@@ -0,0 +1,37 @@
|
|
1
|
+
<div class="row">
|
2
|
+
<div class="col-md-8">
|
3
|
+
<h4>Cadastro de vídeos</h4>
|
4
|
+
|
5
|
+
<% if can? :create, WebAdmin::Video %>
|
6
|
+
<div class="row">
|
7
|
+
<div class="col-md-12"><%= link_to 'Novo', new_video_path, class: 'btn btn-primary link-new' %></div>
|
8
|
+
</div>
|
9
|
+
<% end %>
|
10
|
+
|
11
|
+
<div class="table-responsive">
|
12
|
+
<table class="table table-hover">
|
13
|
+
<thead>
|
14
|
+
<tr>
|
15
|
+
<td>Descrição</td>
|
16
|
+
<td>Link</td>
|
17
|
+
<td>Criado em</td>
|
18
|
+
</tr>
|
19
|
+
</thead>
|
20
|
+
|
21
|
+
<tbody>
|
22
|
+
<% @videos.each do |video| %>
|
23
|
+
<tr>
|
24
|
+
<td><%= link_to video.description, edit_video_path(video) %></td>
|
25
|
+
<td><%= video.link %></td>
|
26
|
+
<td><%= I18n.l video.created_at, format: :only_date %></td>
|
27
|
+
</tr>
|
28
|
+
<% end %>
|
29
|
+
</tbody>
|
30
|
+
</table>
|
31
|
+
</div>
|
32
|
+
</div>
|
33
|
+
|
34
|
+
<div class="col-md-4 box">
|
35
|
+
<h4>Pesquisa</h4>
|
36
|
+
</div>
|
37
|
+
</div>
|
data/bin/rails
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# This command will automatically be run when you run "rails" with Rails 4 gems installed from the root of your application.
|
3
|
+
|
4
|
+
ENGINE_ROOT = File.expand_path('../..', __FILE__)
|
5
|
+
ENGINE_PATH = File.expand_path('../../lib/web_admin/engine', __FILE__)
|
6
|
+
|
7
|
+
# Set up gems listed in the Gemfile.
|
8
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
|
9
|
+
require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
|
10
|
+
|
11
|
+
require 'rails/all'
|
12
|
+
require 'rails/engine/commands'
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# Use this hook to configure ckeditor
|
2
|
+
Ckeditor.setup do |config|
|
3
|
+
# ==> ORM configuration
|
4
|
+
# Load and configure the ORM. Supports :active_record (default), :mongo_mapper and
|
5
|
+
# :mongoid (bson_ext recommended) by default. Other ORMs may be
|
6
|
+
# available as additional gems.
|
7
|
+
require "ckeditor/orm/active_record"
|
8
|
+
|
9
|
+
# Allowed image file types for upload.
|
10
|
+
# Set to nil or [] (empty array) for all file types
|
11
|
+
# By default: %w(jpg jpeg png gif tiff)
|
12
|
+
# config.image_file_types = ["jpg", "jpeg", "png", "gif", "tiff"]
|
13
|
+
|
14
|
+
# Allowed attachment file types for upload.
|
15
|
+
# Set to nil or [] (empty array) for all file types
|
16
|
+
# By default: %w(doc docx xls odt ods pdf rar zip tar tar.gz swf)
|
17
|
+
# config.attachment_file_types = ["doc", "docx", "xls", "odt", "ods", "pdf", "rar", "zip", "tar", "swf"]
|
18
|
+
|
19
|
+
# Setup authorization to be run as a before filter
|
20
|
+
# By default: there is no authorization.
|
21
|
+
# config.authorize_with :cancan
|
22
|
+
|
23
|
+
# Asset model classes
|
24
|
+
# config.picture_model { Ckeditor::Picture }
|
25
|
+
# config.attachment_file_model { Ckeditor::AttachmentFile }
|
26
|
+
|
27
|
+
# Paginate assets
|
28
|
+
# By default: 24
|
29
|
+
# config.default_per_page = 24
|
30
|
+
|
31
|
+
# Customize ckeditor assets path
|
32
|
+
# By default: nil
|
33
|
+
# config.asset_path = "http://www.example.com/assets/ckeditor/"
|
34
|
+
|
35
|
+
# To reduce the asset precompilation time, you can limit plugins and/or languages to those you need:
|
36
|
+
# By default: nil (no limit)
|
37
|
+
# config.assets_languages = ['en', 'uk']
|
38
|
+
# config.assets_plugins = ['image', 'smiley']
|
39
|
+
end
|
@@ -0,0 +1,261 @@
|
|
1
|
+
# Use this hook to configure devise mailer, warden hooks and so forth.
|
2
|
+
# Many of these configuration options can be set straight in your model.
|
3
|
+
Devise.setup do |config|
|
4
|
+
config.router_name = :web_admin
|
5
|
+
config.parent_controller = 'WebAdmin::ApplicationController'
|
6
|
+
# The secret key used by Devise. Devise uses this key to generate
|
7
|
+
# random tokens. Changing this key will render invalid all existing
|
8
|
+
# confirmation, reset password and unlock tokens in the database.
|
9
|
+
# config.secret_key = 'dc29d918d01b5852995f6f33215ae3c236ad02f3a4c777099e264b89d4081305213362b16f74e400dab9483e9077c09416a42e9988311dc7fca65c2cdfd78638'
|
10
|
+
|
11
|
+
# ==> Mailer Configuration
|
12
|
+
# Configure the e-mail address which will be shown in Devise::Mailer,
|
13
|
+
# note that it will be overwritten if you use your own mailer class
|
14
|
+
# with default "from" parameter.
|
15
|
+
config.mailer_sender = 'please-change-me-at-config-initializers-devise@example.com'
|
16
|
+
|
17
|
+
# Configure the class responsible to send e-mails.
|
18
|
+
# config.mailer = 'Devise::Mailer'
|
19
|
+
|
20
|
+
# ==> ORM configuration
|
21
|
+
# Load and configure the ORM. Supports :active_record (default) and
|
22
|
+
# :mongoid (bson_ext recommended) by default. Other ORMs may be
|
23
|
+
# available as additional gems.
|
24
|
+
require 'devise/orm/active_record'
|
25
|
+
|
26
|
+
# ==> Configuration for any authentication mechanism
|
27
|
+
# Configure which keys are used when authenticating a user. The default is
|
28
|
+
# just :email. You can configure it to use [:username, :subdomain], so for
|
29
|
+
# authenticating a user, both parameters are required. Remember that those
|
30
|
+
# parameters are used only when authenticating and not when retrieving from
|
31
|
+
# session. If you need permissions, you should implement that in a before filter.
|
32
|
+
# You can also supply a hash where the value is a boolean determining whether
|
33
|
+
# or not authentication should be aborted when the value is not present.
|
34
|
+
# config.authentication_keys = [ :email ]
|
35
|
+
|
36
|
+
# Configure parameters from the request object used for authentication. Each entry
|
37
|
+
# given should be a request method and it will automatically be passed to the
|
38
|
+
# find_for_authentication method and considered in your model lookup. For instance,
|
39
|
+
# if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
|
40
|
+
# The same considerations mentioned for authentication_keys also apply to request_keys.
|
41
|
+
# config.request_keys = []
|
42
|
+
|
43
|
+
# Configure which authentication keys should be case-insensitive.
|
44
|
+
# These keys will be downcased upon creating or modifying a user and when used
|
45
|
+
# to authenticate or find a user. Default is :email.
|
46
|
+
config.case_insensitive_keys = [ :email ]
|
47
|
+
|
48
|
+
# Configure which authentication keys should have whitespace stripped.
|
49
|
+
# These keys will have whitespace before and after removed upon creating or
|
50
|
+
# modifying a user and when used to authenticate or find a user. Default is :email.
|
51
|
+
config.strip_whitespace_keys = [ :email ]
|
52
|
+
|
53
|
+
# Tell if authentication through request.params is enabled. True by default.
|
54
|
+
# It can be set to an array that will enable params authentication only for the
|
55
|
+
# given strategies, for example, `config.params_authenticatable = [:database]` will
|
56
|
+
# enable it only for database (email + password) authentication.
|
57
|
+
# config.params_authenticatable = true
|
58
|
+
|
59
|
+
# Tell if authentication through HTTP Auth is enabled. False by default.
|
60
|
+
# It can be set to an array that will enable http authentication only for the
|
61
|
+
# given strategies, for example, `config.http_authenticatable = [:database]` will
|
62
|
+
# enable it only for database authentication. The supported strategies are:
|
63
|
+
# :database = Support basic authentication with authentication key + password
|
64
|
+
# config.http_authenticatable = false
|
65
|
+
|
66
|
+
# If 401 status code should be returned for AJAX requests. True by default.
|
67
|
+
# config.http_authenticatable_on_xhr = true
|
68
|
+
|
69
|
+
# The realm used in Http Basic Authentication. 'Application' by default.
|
70
|
+
# config.http_authentication_realm = 'Application'
|
71
|
+
|
72
|
+
# It will change confirmation, password recovery and other workflows
|
73
|
+
# to behave the same regardless if the e-mail provided was right or wrong.
|
74
|
+
# Does not affect registerable.
|
75
|
+
# config.paranoid = true
|
76
|
+
|
77
|
+
# By default Devise will store the user in session. You can skip storage for
|
78
|
+
# particular strategies by setting this option.
|
79
|
+
# Notice that if you are skipping storage for all authentication paths, you
|
80
|
+
# may want to disable generating routes to Devise's sessions controller by
|
81
|
+
# passing skip: :sessions to `devise_for` in your config/routes.rb
|
82
|
+
config.skip_session_storage = [:http_auth]
|
83
|
+
|
84
|
+
# By default, Devise cleans up the CSRF token on authentication to
|
85
|
+
# avoid CSRF token fixation attacks. This means that, when using AJAX
|
86
|
+
# requests for sign in and sign up, you need to get a new CSRF token
|
87
|
+
# from the server. You can disable this option at your own risk.
|
88
|
+
# config.clean_up_csrf_token_on_authentication = true
|
89
|
+
|
90
|
+
# ==> Configuration for :database_authenticatable
|
91
|
+
# For bcrypt, this is the cost for hashing the password and defaults to 10. If
|
92
|
+
# using other encryptors, it sets how many times you want the password re-encrypted.
|
93
|
+
#
|
94
|
+
# Limiting the stretches to just one in testing will increase the performance of
|
95
|
+
# your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
|
96
|
+
# a value less than 10 in other environments. Note that, for bcrypt (the default
|
97
|
+
# encryptor), the cost increases exponentially with the number of stretches (e.g.
|
98
|
+
# a value of 20 is already extremely slow: approx. 60 seconds for 1 calculation).
|
99
|
+
config.stretches = Rails.env.test? ? 1 : 10
|
100
|
+
|
101
|
+
# Setup a pepper to generate the encrypted password.
|
102
|
+
# config.pepper = '27bdbc3c3de7beebff0616e3f49f619baec9fbaf2a348c46a083775faba9f7d3045bd3049c1c7f78d560c3ca143f6eaeead028cb7a31ce3c510c8c288f587131'
|
103
|
+
|
104
|
+
# ==> Configuration for :confirmable
|
105
|
+
# A period that the user is allowed to access the website even without
|
106
|
+
# confirming their account. For instance, if set to 2.days, the user will be
|
107
|
+
# able to access the website for two days without confirming their account,
|
108
|
+
# access will be blocked just in the third day. Default is 0.days, meaning
|
109
|
+
# the user cannot access the website without confirming their account.
|
110
|
+
# config.allow_unconfirmed_access_for = 2.days
|
111
|
+
|
112
|
+
# A period that the user is allowed to confirm their account before their
|
113
|
+
# token becomes invalid. For example, if set to 3.days, the user can confirm
|
114
|
+
# their account within 3 days after the mail was sent, but on the fourth day
|
115
|
+
# their account can't be confirmed with the token any more.
|
116
|
+
# Default is nil, meaning there is no restriction on how long a user can take
|
117
|
+
# before confirming their account.
|
118
|
+
# config.confirm_within = 3.days
|
119
|
+
|
120
|
+
# If true, requires any email changes to be confirmed (exactly the same way as
|
121
|
+
# initial account confirmation) to be applied. Requires additional unconfirmed_email
|
122
|
+
# db field (see migrations). Until confirmed, new email is stored in
|
123
|
+
# unconfirmed_email column, and copied to email column on successful confirmation.
|
124
|
+
config.reconfirmable = true
|
125
|
+
|
126
|
+
# Defines which key will be used when confirming an account
|
127
|
+
# config.confirmation_keys = [ :email ]
|
128
|
+
|
129
|
+
# ==> Configuration for :rememberable
|
130
|
+
# The time the user will be remembered without asking for credentials again.
|
131
|
+
# config.remember_for = 2.weeks
|
132
|
+
|
133
|
+
# Invalidates all the remember me tokens when the user signs out.
|
134
|
+
config.expire_all_remember_me_on_sign_out = true
|
135
|
+
|
136
|
+
# If true, extends the user's remember period when remembered via cookie.
|
137
|
+
# config.extend_remember_period = false
|
138
|
+
|
139
|
+
# Options to be passed to the created cookie. For instance, you can set
|
140
|
+
# secure: true in order to force SSL only cookies.
|
141
|
+
# config.rememberable_options = {}
|
142
|
+
|
143
|
+
# ==> Configuration for :validatable
|
144
|
+
# Range for password length.
|
145
|
+
config.password_length = 8..128
|
146
|
+
|
147
|
+
# Email regex used to validate email formats. It simply asserts that
|
148
|
+
# one (and only one) @ exists in the given string. This is mainly
|
149
|
+
# to give user feedback and not to assert the e-mail validity.
|
150
|
+
# config.email_regexp = /\A[^@]+@[^@]+\z/
|
151
|
+
|
152
|
+
# ==> Configuration for :timeoutable
|
153
|
+
# The time you want to timeout the user session without activity. After this
|
154
|
+
# time the user will be asked for credentials again. Default is 30 minutes.
|
155
|
+
# config.timeout_in = 30.minutes
|
156
|
+
|
157
|
+
# If true, expires auth token on session timeout.
|
158
|
+
# config.expire_auth_token_on_timeout = false
|
159
|
+
|
160
|
+
# ==> Configuration for :lockable
|
161
|
+
# Defines which strategy will be used to lock an account.
|
162
|
+
# :failed_attempts = Locks an account after a number of failed attempts to sign in.
|
163
|
+
# :none = No lock strategy. You should handle locking by yourself.
|
164
|
+
# config.lock_strategy = :failed_attempts
|
165
|
+
|
166
|
+
# Defines which key will be used when locking and unlocking an account
|
167
|
+
# config.unlock_keys = [ :email ]
|
168
|
+
|
169
|
+
# Defines which strategy will be used to unlock an account.
|
170
|
+
# :email = Sends an unlock link to the user email
|
171
|
+
# :time = Re-enables login after a certain amount of time (see :unlock_in below)
|
172
|
+
# :both = Enables both strategies
|
173
|
+
# :none = No unlock strategy. You should handle unlocking by yourself.
|
174
|
+
# config.unlock_strategy = :both
|
175
|
+
|
176
|
+
# Number of authentication tries before locking an account if lock_strategy
|
177
|
+
# is failed attempts.
|
178
|
+
# config.maximum_attempts = 20
|
179
|
+
|
180
|
+
# Time interval to unlock the account if :time is enabled as unlock_strategy.
|
181
|
+
# config.unlock_in = 1.hour
|
182
|
+
|
183
|
+
# Warn on the last attempt before the account is locked.
|
184
|
+
# config.last_attempt_warning = true
|
185
|
+
|
186
|
+
# ==> Configuration for :recoverable
|
187
|
+
#
|
188
|
+
# Defines which key will be used when recovering the password for an account
|
189
|
+
# config.reset_password_keys = [ :email ]
|
190
|
+
|
191
|
+
# Time interval you can reset your password with a reset password key.
|
192
|
+
# Don't put a too small interval or your users won't have the time to
|
193
|
+
# change their passwords.
|
194
|
+
config.reset_password_within = 6.hours
|
195
|
+
|
196
|
+
# ==> Configuration for :encryptable
|
197
|
+
# Allow you to use another encryption algorithm besides bcrypt (default). You can use
|
198
|
+
# :sha1, :sha512 or encryptors from others authentication tools as :clearance_sha1,
|
199
|
+
# :authlogic_sha512 (then you should set stretches above to 20 for default behavior)
|
200
|
+
# and :restful_authentication_sha1 (then you should set stretches to 10, and copy
|
201
|
+
# REST_AUTH_SITE_KEY to pepper).
|
202
|
+
#
|
203
|
+
# Require the `devise-encryptable` gem when using anything other than bcrypt
|
204
|
+
# config.encryptor = :sha512
|
205
|
+
|
206
|
+
# ==> Scopes configuration
|
207
|
+
# Turn scoped views on. Before rendering "sessions/new", it will first check for
|
208
|
+
# "users/sessions/new". It's turned off by default because it's slower if you
|
209
|
+
# are using only default views.
|
210
|
+
# config.scoped_views = false
|
211
|
+
|
212
|
+
# Configure the default scope given to Warden. By default it's the first
|
213
|
+
# devise role declared in your routes (usually :user).
|
214
|
+
# config.default_scope = :user
|
215
|
+
|
216
|
+
# Set this configuration to false if you want /users/sign_out to sign out
|
217
|
+
# only the current scope. By default, Devise signs out all scopes.
|
218
|
+
# config.sign_out_all_scopes = true
|
219
|
+
|
220
|
+
# ==> Navigation configuration
|
221
|
+
# Lists the formats that should be treated as navigational. Formats like
|
222
|
+
# :html, should redirect to the sign in page when the user does not have
|
223
|
+
# access, but formats like :xml or :json, should return 401.
|
224
|
+
#
|
225
|
+
# If you have any extra navigational formats, like :iphone or :mobile, you
|
226
|
+
# should add them to the navigational formats lists.
|
227
|
+
#
|
228
|
+
# The "*/*" below is required to match Internet Explorer requests.
|
229
|
+
# config.navigational_formats = ['*/*', :html]
|
230
|
+
|
231
|
+
# The default HTTP method used to sign out a resource. Default is :delete.
|
232
|
+
config.sign_out_via = :delete
|
233
|
+
|
234
|
+
# ==> OmniAuth
|
235
|
+
# Add a new OmniAuth provider. Check the wiki for more information on setting
|
236
|
+
# up on your models and hooks.
|
237
|
+
# config.omniauth :github, 'APP_ID', 'APP_SECRET', scope: 'user,public_repo'
|
238
|
+
|
239
|
+
# ==> Warden configuration
|
240
|
+
# If you want to use other strategies, that are not supported by Devise, or
|
241
|
+
# change the failure app, you can configure them inside the config.warden block.
|
242
|
+
#
|
243
|
+
# config.warden do |manager|
|
244
|
+
# manager.intercept_401 = false
|
245
|
+
# manager.default_strategies(scope: :user).unshift :some_external_strategy
|
246
|
+
# end
|
247
|
+
|
248
|
+
# ==> Mountable engine configurations
|
249
|
+
# When using Devise inside an engine, let's call it `MyEngine`, and this engine
|
250
|
+
# is mountable, there are some extra configurations to be taken into account.
|
251
|
+
# The following options are available, assuming the engine is mounted as:
|
252
|
+
#
|
253
|
+
# mount MyEngine, at: '/my_engine'
|
254
|
+
#
|
255
|
+
# The router that invoked `devise_for`, in the example above, would be:
|
256
|
+
# config.router_name = :my_engine
|
257
|
+
#
|
258
|
+
# When using omniauth, Devise cannot automatically set Omniauth path,
|
259
|
+
# so you need to do it manually. For the users scope, it would be:
|
260
|
+
# config.omniauth_path_prefix = '/my_engine/users/auth'
|
261
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
ActiveRecord::Base.extend EnumerateIt
|
@@ -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
|