fae-railsz 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +5 -0
- data/Rakefile +37 -0
- data/app/assets/fonts/fae/icons.eot +0 -0
- data/app/assets/fonts/fae/icons.svg +56 -0
- data/app/assets/fonts/fae/icons.ttf +0 -0
- data/app/assets/fonts/fae/icons.woff +0 -0
- data/app/assets/fonts/fae/lato-bold-webfont.eot +0 -0
- data/app/assets/fonts/fae/lato-bold-webfont.svg +4551 -0
- data/app/assets/fonts/fae/lato-bold-webfont.ttf +0 -0
- data/app/assets/fonts/fae/lato-bold-webfont.woff +0 -0
- data/app/assets/fonts/fae/lato-light-webfont.eot +0 -0
- data/app/assets/fonts/fae/lato-light-webfont.svg +4241 -0
- data/app/assets/fonts/fae/lato-light-webfont.ttf +0 -0
- data/app/assets/fonts/fae/lato-light-webfont.woff +0 -0
- data/app/assets/fonts/fae/lato-regular-webfont.eot +0 -0
- data/app/assets/fonts/fae/lato-regular-webfont.svg +4241 -0
- data/app/assets/fonts/fae/lato-regular-webfont.ttf +0 -0
- data/app/assets/fonts/fae/lato-regular-webfont.woff +0 -0
- data/app/assets/fonts/fae/selection.json +1334 -0
- data/app/assets/images/fae/error_bg.jpg +0 -0
- data/app/assets/images/fae/error_sad_face.png +0 -0
- data/app/assets/images/fae/icons/alert.svg +9 -0
- data/app/assets/images/fae/icons/arrow_down.svg +8 -0
- data/app/assets/images/fae/icons/arrow_left.svg +9 -0
- data/app/assets/images/fae/icons/arrow_right.svg +9 -0
- data/app/assets/images/fae/icons/arrow_stacked.svg +8 -0
- data/app/assets/images/fae/icons/arrow_up.svg +8 -0
- data/app/assets/images/fae/icons/calendar.svg +17 -0
- data/app/assets/images/fae/icons/check.svg +7 -0
- data/app/assets/images/fae/icons/checkmark.svg +8 -0
- data/app/assets/images/fae/icons/chevron_down.svg +7 -0
- data/app/assets/images/fae/icons/chevron_left.svg +10 -0
- data/app/assets/images/fae/icons/chevron_right.svg +10 -0
- data/app/assets/images/fae/icons/chevron_up.svg +7 -0
- data/app/assets/images/fae/icons/delete.svg +8 -0
- data/app/assets/images/fae/icons/delete_x.svg +8 -0
- data/app/assets/images/fae/icons/edit.svg +11 -0
- data/app/assets/images/fae/icons/handle.svg +13 -0
- data/app/assets/images/fae/icons/home.svg +10 -0
- data/app/assets/images/fae/icons/logout.svg +12 -0
- data/app/assets/images/fae/icons/magnifying_glass.svg +10 -0
- data/app/assets/images/fae/icons/menu.svg +11 -0
- data/app/assets/images/fae/icons/offlink.svg +25 -0
- data/app/assets/images/fae/icons/plus.svg +8 -0
- data/app/assets/images/fae/icons/pulldown.svg +11 -0
- data/app/assets/images/fae/icons/search.svg +11 -0
- data/app/assets/images/fae/icons/settings.svg +12 -0
- data/app/assets/images/fae/icons/sort.svg +11 -0
- data/app/assets/images/fae/icons/support.svg +15 -0
- data/app/assets/images/fae/icons/trash.svg +10 -0
- data/app/assets/images/fae/icons/trumbowyg.svg +1 -0
- data/app/assets/images/fae/icons/user.svg +13 -0
- data/app/assets/images/fae/icons/users.svg +19 -0
- data/app/assets/images/fae/icons/zoom.svg +12 -0
- data/app/assets/images/fae/tutorial_model_location.png +0 -0
- data/app/assets/images/fae/youtube_helper.jpg +0 -0
- data/app/assets/javascripts/fae/_modals.js +60 -0
- data/app/assets/javascripts/fae/_tables.js +403 -0
- data/app/assets/javascripts/fae/admin.js.erb +11 -0
- data/app/assets/javascripts/fae/application.js +63 -0
- data/app/assets/javascripts/fae/fae_init.js +8 -0
- data/app/assets/javascripts/fae/form/_ajax.js +380 -0
- data/app/assets/javascripts/fae/form/_cancel.js +38 -0
- data/app/assets/javascripts/fae/form/_filtering.js +276 -0
- data/app/assets/javascripts/fae/form/_form.js +60 -0
- data/app/assets/javascripts/fae/form/_slugger.js.erb +100 -0
- data/app/assets/javascripts/fae/form/_validator.js +459 -0
- data/app/assets/javascripts/fae/form/fae_chosen.js +44 -0
- data/app/assets/javascripts/fae/form/fileinputer.js +178 -0
- data/app/assets/javascripts/fae/form/hinter.js +111 -0
- data/app/assets/javascripts/fae/form/inputs/_checkbox.js +27 -0
- data/app/assets/javascripts/fae/form/inputs/_color.js +42 -0
- data/app/assets/javascripts/fae/form/inputs/_dates.js +78 -0
- data/app/assets/javascripts/fae/form/inputs/_select.js +162 -0
- data/app/assets/javascripts/fae/form/inputs/_text.js +118 -0
- data/app/assets/javascripts/fae/navigation/_global_search.js +184 -0
- data/app/assets/javascripts/fae/navigation/_language.js +89 -0
- data/app/assets/javascripts/fae/navigation/_navigation.js +206 -0
- data/app/assets/javascripts/fae/navigation/_subnav_highlighter.js +81 -0
- data/app/assets/javascripts/fae/navigation/sticky.js +186 -0
- data/app/assets/javascripts/fae/vendor/chosen.jquery.min.js +2 -0
- data/app/assets/javascripts/fae/vendor/frob_core_helpers.js +587 -0
- data/app/assets/javascripts/fae/vendor/fryr.js +437 -0
- data/app/assets/javascripts/fae/vendor/jqColorPicker.min.js +4 -0
- data/app/assets/javascripts/fae/vendor/jquery.daterangepicker.js +1292 -0
- data/app/assets/javascripts/fae/vendor/jquery.multi-select.js +534 -0
- data/app/assets/javascripts/fae/vendor/jquery.simplemodal.1.4.4.js +719 -0
- data/app/assets/javascripts/fae/vendor/jquery.tablesorter.js +1901 -0
- data/app/assets/javascripts/fae/vendor/js.cookie.js +139 -0
- data/app/assets/javascripts/fae/vendor/moment.min.js +7 -0
- data/app/assets/javascripts/fae/vendor/simplemde.min.js +13 -0
- data/app/assets/javascripts/fae/vendor/touch_punch.js +11 -0
- data/app/assets/javascripts/fae/vendor/trumbowyg.js.erb +4 -0
- data/app/assets/javascripts/fae/vendor/trumbowyg/plugins/upload/trumbowyg.upload.js +223 -0
- data/app/assets/javascripts/fae/vendor/trumbowyg/trumbowyg.js +1603 -0
- data/app/assets/stylesheets/fae/application.css +8 -0
- data/app/assets/stylesheets/fae/base.scss +82 -0
- data/app/assets/stylesheets/fae/globals/_fonts.scss +43 -0
- data/app/assets/stylesheets/fae/globals/_icons.scss +15 -0
- data/app/assets/stylesheets/fae/globals/_plugins.scss +51 -0
- data/app/assets/stylesheets/fae/globals/_tags.scss +68 -0
- data/app/assets/stylesheets/fae/globals/imports/_extends.scss +53 -0
- data/app/assets/stylesheets/fae/globals/imports/_mixins.scss +58 -0
- data/app/assets/stylesheets/fae/globals/imports/_variables.scss +165 -0
- data/app/assets/stylesheets/fae/globals/imports/finescss/_fine.scss +7 -0
- data/app/assets/stylesheets/fae/globals/imports/finescss/_fine_functions.scss +88 -0
- data/app/assets/stylesheets/fae/globals/imports/finescss/_fine_mixins.scss +280 -0
- data/app/assets/stylesheets/fae/globals/imports/finescss/_fine_variables.scss +30 -0
- data/app/assets/stylesheets/fae/globals/layout/_base.scss +48 -0
- data/app/assets/stylesheets/fae/globals/layout/_breadcrumbs.scss +45 -0
- data/app/assets/stylesheets/fae/globals/layout/_content-header.scss +99 -0
- data/app/assets/stylesheets/fae/globals/legacy/_pre-1.3.scss +659 -0
- data/app/assets/stylesheets/fae/globals/navigation/_base.scss +22 -0
- data/app/assets/stylesheets/fae/globals/navigation/_footer.scss +50 -0
- data/app/assets/stylesheets/fae/globals/navigation/_header.scss +149 -0
- data/app/assets/stylesheets/fae/globals/navigation/_mobilenav.scss +149 -0
- data/app/assets/stylesheets/fae/globals/navigation/_search.scss +76 -0
- data/app/assets/stylesheets/fae/globals/navigation/_sidenav.scss +142 -0
- data/app/assets/stylesheets/fae/globals/navigation/_utility.scss +95 -0
- data/app/assets/stylesheets/fae/modules/_alerts.scss +50 -0
- data/app/assets/stylesheets/fae/modules/_buttons.scss +62 -0
- data/app/assets/stylesheets/fae/modules/_modal.scss +78 -0
- data/app/assets/stylesheets/fae/modules/_toggles.scss +48 -0
- data/app/assets/stylesheets/fae/modules/forms/_asset-actions.scss +83 -0
- data/app/assets/stylesheets/fae/modules/forms/_base.scss +100 -0
- data/app/assets/stylesheets/fae/modules/forms/_checkbox.scss +87 -0
- data/app/assets/stylesheets/fae/modules/forms/_colorpicker.scss +57 -0
- data/app/assets/stylesheets/fae/modules/forms/_date.scss +335 -0
- data/app/assets/stylesheets/fae/modules/forms/_hints.scss +40 -0
- data/app/assets/stylesheets/fae/modules/forms/_label.scss +57 -0
- data/app/assets/stylesheets/fae/modules/forms/_radio.scss +69 -0
- data/app/assets/stylesheets/fae/modules/forms/_select.scss +317 -0
- data/app/assets/stylesheets/fae/modules/forms/_simple-mde.scss +29 -0
- data/app/assets/stylesheets/fae/modules/forms/_text.scss +62 -0
- data/app/assets/stylesheets/fae/modules/forms/_textarea.scss +16 -0
- data/app/assets/stylesheets/fae/modules/forms/_validation.scss +63 -0
- data/app/assets/stylesheets/fae/modules/tables/_actions.scss +41 -0
- data/app/assets/stylesheets/fae/modules/tables/_base.scss +63 -0
- data/app/assets/stylesheets/fae/modules/tables/_collapsible.scss +76 -0
- data/app/assets/stylesheets/fae/modules/tables/_filters.scss +61 -0
- data/app/assets/stylesheets/fae/modules/tables/_image.scss +21 -0
- data/app/assets/stylesheets/fae/modules/tables/_pagination.scss +34 -0
- data/app/assets/stylesheets/fae/modules/tables/_sorting.scss +58 -0
- data/app/assets/stylesheets/fae/modules/tables/_sticky.scss +9 -0
- data/app/assets/stylesheets/fae/modules/tables/_tooltips.scss +24 -0
- data/app/assets/stylesheets/fae/pages/_error.scss +35 -0
- data/app/assets/stylesheets/fae/pages/_help.scss +28 -0
- data/app/assets/stylesheets/fae/pages/_home.scss +18 -0
- data/app/assets/stylesheets/fae/pages/_login.scss +137 -0
- data/app/assets/stylesheets/fae/vendor/chosen.css +377 -0
- data/app/assets/stylesheets/fae/vendor/daterangepicker.css +227 -0
- data/app/assets/stylesheets/fae/vendor/reset.css +48 -0
- data/app/assets/stylesheets/fae/vendor/simplemde.min.css +7 -0
- data/app/assets/stylesheets/fae/vendor/trumbowyg.css +584 -0
- data/app/controllers/concerns/fae/application_controller_concern.rb +1 -0
- data/app/controllers/concerns/fae/asset_cloner.rb +46 -0
- data/app/controllers/concerns/fae/cloneable.rb +136 -0
- data/app/controllers/fae/application_controller.rb +123 -0
- data/app/controllers/fae/base_controller.rb +117 -0
- data/app/controllers/fae/files_controller.rb +26 -0
- data/app/controllers/fae/images_controller.rb +37 -0
- data/app/controllers/fae/nested_base_controller.rb +100 -0
- data/app/controllers/fae/options_controller.rb +29 -0
- data/app/controllers/fae/pages_controller.rb +44 -0
- data/app/controllers/fae/setup_controller.rb +54 -0
- data/app/controllers/fae/static_pages_controller.rb +54 -0
- data/app/controllers/fae/users_controller.rb +71 -0
- data/app/controllers/fae/utilities_controller.rb +61 -0
- data/app/helpers/fae/application_helper.rb +114 -0
- data/app/helpers/fae/fae_helper.rb +6 -0
- data/app/helpers/fae/form_helper.rb +240 -0
- data/app/helpers/fae/nested_form_helper.rb +39 -0
- data/app/helpers/fae/view_helper.rb +175 -0
- data/app/inputs/date_range_input.rb +17 -0
- data/app/inputs/radio_collection_input.rb +17 -0
- data/app/inputs/symbol_input.rb +5 -0
- data/app/models/concerns/fae/assets_validatable.rb +12 -0
- data/app/models/concerns/fae/authorization_concern.rb +12 -0
- data/app/models/concerns/fae/base_model_concern.rb +105 -0
- data/app/models/concerns/fae/change_concern.rb +1 -0
- data/app/models/concerns/fae/file_concern.rb +1 -0
- data/app/models/concerns/fae/image_concern.rb +1 -0
- data/app/models/concerns/fae/navigation_concern.rb +10 -0
- data/app/models/concerns/fae/option_concern.rb +1 -0
- data/app/models/concerns/fae/page_validatable.rb +26 -0
- data/app/models/concerns/fae/paper_trailer.rb +8 -0
- data/app/models/concerns/fae/role_concern.rb +1 -0
- data/app/models/concerns/fae/sortable.rb +51 -0
- data/app/models/concerns/fae/static_page_concern.rb +1 -0
- data/app/models/concerns/fae/text_area_concern.rb +1 -0
- data/app/models/concerns/fae/text_field_concern.rb +1 -0
- data/app/models/concerns/fae/trackable.rb +124 -0
- data/app/models/concerns/fae/user_concern.rb +7 -0
- data/app/models/fae/authorization.rb +8 -0
- data/app/models/fae/change.rb +53 -0
- data/app/models/fae/file.rb +24 -0
- data/app/models/fae/image.rb +33 -0
- data/app/models/fae/navigation.rb +132 -0
- data/app/models/fae/option.rb +38 -0
- data/app/models/fae/role.rb +18 -0
- data/app/models/fae/static_page.rb +109 -0
- data/app/models/fae/text_area.rb +14 -0
- data/app/models/fae/text_field.rb +14 -0
- data/app/models/fae/user.rb +67 -0
- data/app/uploaders/fae/file_uploader.rb +26 -0
- data/app/uploaders/fae/image_uploader.rb +28 -0
- data/app/validators/fae/cross_model_uniqueness_validator.rb +14 -0
- data/app/views/devise/confirmations/new.html.slim +13 -0
- data/app/views/devise/mailer/confirmation_instructions.html.slim +3 -0
- data/app/views/devise/mailer/reset_password_instructions.html.slim +5 -0
- data/app/views/devise/mailer/unlock_instructions.html.slim +4 -0
- data/app/views/devise/passwords/edit.html.slim +10 -0
- data/app/views/devise/passwords/new.html.slim +10 -0
- data/app/views/devise/registrations/edit.html.slim +22 -0
- data/app/views/devise/registrations/new.html.slim +15 -0
- data/app/views/devise/sessions/new.html.slim +7 -0
- data/app/views/devise/shared/_links.slim +25 -0
- data/app/views/devise/unlocks/new.html.slim +13 -0
- data/app/views/fae/application/_breadcrumb.html.slim +19 -0
- data/app/views/fae/application/_content_form.html.slim +55 -0
- data/app/views/fae/application/_credit.slim +6 -0
- data/app/views/fae/application/_file_uploader.html.slim +36 -0
- data/app/views/fae/application/_flash_messages.slim +2 -0
- data/app/views/fae/application/_global_search_results.html.slim +37 -0
- data/app/views/fae/application/_header.slim +50 -0
- data/app/views/fae/application/_markdown_helper.slim +41 -0
- data/app/views/fae/application/_mobilenav.slim +66 -0
- data/app/views/fae/application/_sidenav.slim +23 -0
- data/app/views/fae/application/_user_log.html.slim +36 -0
- data/app/views/fae/images/_image_uploader.html.slim +66 -0
- data/app/views/fae/options/_form.html.slim +16 -0
- data/app/views/fae/options/edit.html.slim +1 -0
- data/app/views/fae/pages/activity_log.html.slim +32 -0
- data/app/views/fae/pages/disabled_environment.html.slim +4 -0
- data/app/views/fae/pages/error404.html.slim +7 -0
- data/app/views/fae/pages/help.html.slim +35 -0
- data/app/views/fae/pages/home.html.slim +36 -0
- data/app/views/fae/setup/first_user.html.slim +11 -0
- data/app/views/fae/shared/_errors.slim +4 -0
- data/app/views/fae/shared/_form_header.html.slim +40 -0
- data/app/views/fae/shared/_index_header.html.slim +26 -0
- data/app/views/fae/shared/_nested_table.html.slim +49 -0
- data/app/views/fae/shared/_recent_changes.html.slim +22 -0
- data/app/views/fae/shared/_shared_nested_table.html.slim +46 -0
- data/app/views/fae/static_pages/index.html.slim +13 -0
- data/app/views/fae/users/_form.html.slim +19 -0
- data/app/views/fae/users/edit.html.slim +1 -0
- data/app/views/fae/users/index.html.slim +23 -0
- data/app/views/fae/users/new.html.slim +1 -0
- data/app/views/fae/users/settings.html.slim +1 -0
- data/app/views/kaminari/fae/_gap.html.slim +8 -0
- data/app/views/kaminari/fae/_next_page.html.slim +9 -0
- data/app/views/kaminari/fae/_page.html.slim +15 -0
- data/app/views/kaminari/fae/_paginator.html.slim +15 -0
- data/app/views/kaminari/fae/_prev_page.html.slim +9 -0
- data/app/views/layouts/devise.html.slim +29 -0
- data/app/views/layouts/fae/application.html.slim +23 -0
- data/app/views/layouts/fae/error.html.slim +11 -0
- data/config/deploy.rb +73 -0
- data/config/deploy/dev.rb +19 -0
- data/config/deploy/prod.rb +19 -0
- data/config/deploy/stage.rb +19 -0
- data/config/initializers/assets.rb +1 -0
- data/config/initializers/carrierwave.rb +3 -0
- data/config/initializers/devise.rb +258 -0
- data/config/initializers/devise_monkeypatch.rb +11 -0
- data/config/initializers/fae_judge.rb +3 -0
- data/config/initializers/inflections.rb +16 -0
- data/config/initializers/kaminari_config.rb +10 -0
- data/config/initializers/simple_form.rb +147 -0
- data/config/initializers/time_formats.rb +3 -0
- data/config/locales/devise.en.yml +59 -0
- data/config/locales/devise.zh-CN.yml +59 -0
- data/config/locales/fae.en.yml +10 -0
- data/config/locales/fae.zh-CN.yml +10 -0
- data/config/locales/simple_form.en.yml +26 -0
- data/config/locales/simple_form.zh-CN.yml +26 -0
- data/config/routes.rb +46 -0
- data/db/migrate/20140809222030_add_user_table.rb +49 -0
- data/db/migrate/20140822224029_create_fae_roles.rb +10 -0
- data/db/migrate/20141008180718_create_fae_images_table.rb +19 -0
- data/db/migrate/20141017194616_create_fae_options.rb +16 -0
- data/db/migrate/20141021181327_create_fae_files.rb +17 -0
- data/db/migrate/20141021183047_create_fae_text_areas.rb +16 -0
- data/db/migrate/20141021184311_create_fae_pages.rb +13 -0
- data/db/migrate/20141105214814_create_fae_text_fields.rb +15 -0
- data/db/migrate/20150930224821_create_fae_changes.rb +17 -0
- data/lib/fae-rails.rb +6 -0
- data/lib/fae/concerns/models/base.rb +8 -0
- data/lib/fae/engine.rb +37 -0
- data/lib/fae/options.rb +35 -0
- data/lib/fae/validation_helper_collection.rb +76 -0
- data/lib/fae/version.rb +3 -0
- data/lib/file_size_validator.rb +71 -0
- data/lib/generators/fae/base_generator.rb +156 -0
- data/lib/generators/fae/controller_generator.rb +13 -0
- data/lib/generators/fae/install_generator.rb +61 -0
- data/lib/generators/fae/model_generator.rb +11 -0
- data/lib/generators/fae/nested_index_scaffold_generator.rb +36 -0
- data/lib/generators/fae/nested_scaffold_generator.rb +51 -0
- data/lib/generators/fae/page_generator.rb +65 -0
- data/lib/generators/fae/scaffold_generator.rb +15 -0
- data/lib/generators/fae/templates/assets/fae.js +6 -0
- data/lib/generators/fae/templates/assets/fae.scss +2 -0
- data/lib/generators/fae/templates/controllers/nested_index_scaffold_controller.rb +81 -0
- data/lib/generators/fae/templates/controllers/nested_scaffold_controller.rb +13 -0
- data/lib/generators/fae/templates/controllers/scaffold_controller.rb +13 -0
- data/lib/generators/fae/templates/controllers/static_pages_controller.rb +10 -0
- data/lib/generators/fae/templates/initializers/fae.rb +63 -0
- data/lib/generators/fae/templates/initializers/fae_fine.rb +51 -0
- data/lib/generators/fae/templates/initializers/judge.rb +6 -0
- data/lib/generators/fae/templates/models/concerns/authorization_concern.rb +27 -0
- data/lib/generators/fae/templates/models/concerns/navigation_concern.rb +33 -0
- data/lib/generators/fae/templates/models/pages_model.rb +14 -0
- data/lib/generators/fae/templates/tasks/fae_tasks.rake +19 -0
- data/lib/generators/fae/templates/views/_form.html.slim +18 -0
- data/lib/generators/fae/templates/views/_form_index_nested.html.slim +13 -0
- data/lib/generators/fae/templates/views/_form_nested.html.slim +17 -0
- data/lib/generators/fae/templates/views/edit.html.slim +1 -0
- data/lib/generators/fae/templates/views/edit_nested.html.slim +3 -0
- data/lib/generators/fae/templates/views/index.html.slim +35 -0
- data/lib/generators/fae/templates/views/index_nested.html.slim +8 -0
- data/lib/generators/fae/templates/views/new.html.slim +1 -0
- data/lib/generators/fae/templates/views/new_nested.html.slim +3 -0
- data/lib/generators/fae/templates/views/static_page_form.html.slim +15 -0
- data/lib/generators/fae/templates/views/table_nested.html.slim +4 -0
- metadata +692 -0
@@ -0,0 +1,22 @@
|
|
1
|
+
- unless params[:action] == 'new'
|
2
|
+
.content#recent_changes
|
3
|
+
h2 Recent Changes
|
4
|
+
section.addedit-form.js-addedit-form
|
5
|
+
table
|
6
|
+
thead
|
7
|
+
tr
|
8
|
+
th User
|
9
|
+
th Type
|
10
|
+
th Attribute(s) Updated
|
11
|
+
th.-action-wide Modified
|
12
|
+
tbody
|
13
|
+
- if @item.try(:tracked_changes).present?
|
14
|
+
- @item.tracked_changes.each do |change|
|
15
|
+
tr
|
16
|
+
td = change.user.full_name if change.user.present?
|
17
|
+
td = change.change_type
|
18
|
+
td = change.updated_attributes.join(', ') if change.updated_attributes.present?
|
19
|
+
td = fae_datetime_format(change.updated_at)
|
20
|
+
- else
|
21
|
+
tr
|
22
|
+
td colspan="4" No changes recorded
|
@@ -0,0 +1,46 @@
|
|
1
|
+
ruby:
|
2
|
+
colspan = cols.length + 1
|
3
|
+
colspan += 1 if ordered
|
4
|
+
colspan += 1 if has_thumb
|
5
|
+
table_class = ordered ? 'js-sort-row' : nil
|
6
|
+
|
7
|
+
options_for_td = { cols: cols, edit_path: edit_path, edit_column: edit_column }
|
8
|
+
|
9
|
+
table class=table_class
|
10
|
+
thead
|
11
|
+
tr
|
12
|
+
- if ordered
|
13
|
+
th.th-sortable-handle
|
14
|
+
- if has_thumb
|
15
|
+
th.-thumb
|
16
|
+
- cols.each do |col|
|
17
|
+
= th_columns(col)
|
18
|
+
- if edit_column
|
19
|
+
th.-action data-sorter="false"
|
20
|
+
th.-action
|
21
|
+
tbody
|
22
|
+
- records = index ? @items : parent_item.send(assoc)
|
23
|
+
- if records.present?
|
24
|
+
- records.each do |item|
|
25
|
+
tr id=tr_id(item)
|
26
|
+
- if ordered
|
27
|
+
td.sortable-handle: i.icon-sort
|
28
|
+
- if has_thumb
|
29
|
+
td = image_tag(item.asset.thumb.url)
|
30
|
+
- cols.each do |col|
|
31
|
+
- options_for_td[:col] = col
|
32
|
+
- options_for_td[:item] = item
|
33
|
+
= td_columns(options_for_td)
|
34
|
+
- if edit_column
|
35
|
+
td
|
36
|
+
a.js-edit-link.js-tooltip.table-action title="Edit" href=self.send(edit_path, item)
|
37
|
+
i.icon-edit
|
38
|
+
td = fae_delete_button item, "/#{fae_path}/#{assoc_name}/#{item.id.to_s}", class: 'js-tooltip table-action js-delete-link', remote: true
|
39
|
+
|
40
|
+
- else
|
41
|
+
tr
|
42
|
+
- td_link = link_to 'add some', new_path, class: 'js-add-link'
|
43
|
+
|
44
|
+
td colspan=colspan.to_s No #{title} yet, #{td_link}.
|
45
|
+
|
46
|
+
.js-addedit-form-wrapper
|
@@ -0,0 +1,13 @@
|
|
1
|
+
== render 'fae/shared/index_header', title: 'Pages', breadcrumbs: false, new_button: false
|
2
|
+
|
3
|
+
main.content
|
4
|
+
table.js-sort-column
|
5
|
+
thead
|
6
|
+
tr
|
7
|
+
th Name
|
8
|
+
th.-action-wide Modified
|
9
|
+
tbody
|
10
|
+
- @items.each do |item|
|
11
|
+
tr id="fae_content_block_#{item.id}"
|
12
|
+
td = link_to item.title.titleize, fae.edit_content_block_path(item.slug)
|
13
|
+
td = fae_date_format item.updated_at
|
@@ -0,0 +1,19 @@
|
|
1
|
+
= simple_form_for(@user, html: {multipart: true, novalidate: true}) do |f|
|
2
|
+
header.content-header.js-content-header
|
3
|
+
- if params[:action] === 'settings'
|
4
|
+
h1 Your Settings
|
5
|
+
- else
|
6
|
+
= form_header @user
|
7
|
+
.content-header-buttons
|
8
|
+
- cancel_path = params[:action] == 'settings' ? root_path : users_path
|
9
|
+
a.button#js-header-cancel href=cancel_path Cancel
|
10
|
+
= f.submit 'Save'
|
11
|
+
|
12
|
+
main.content
|
13
|
+
= fae_input f, :first_name
|
14
|
+
= fae_input f, :last_name
|
15
|
+
= fae_input f, :email
|
16
|
+
= fae_input f, :password, helper_text: 'To update your password, fill out the fields below. Otherwise leave blank. Passwords must contain at least 8 characters.'
|
17
|
+
= fae_input f, :password_confirmation
|
18
|
+
- if current_user.admin? || current_user.super_admin?
|
19
|
+
= fae_association f, :role, collection: @role_collection
|
@@ -0,0 +1 @@
|
|
1
|
+
== render 'form'
|
@@ -0,0 +1,23 @@
|
|
1
|
+
- @new_path = new_user_path
|
2
|
+
== render 'fae/shared/index_header', title: 'Users', new_button: true, button_text: 'Add User', breadcrumbs: false
|
3
|
+
|
4
|
+
main.content
|
5
|
+
table.js-sort-column
|
6
|
+
thead
|
7
|
+
tr
|
8
|
+
th Name
|
9
|
+
th Email
|
10
|
+
th Role
|
11
|
+
th Last Logged In
|
12
|
+
th.-action data-sorter="false" Active
|
13
|
+
th.-action data-sorter="false"
|
14
|
+
|
15
|
+
tbody
|
16
|
+
- @users.each do |user|
|
17
|
+
tr id="fae_user_#{user.id}"
|
18
|
+
td: a href=edit_user_path(user) #{user.first_name} #{user.last_name}
|
19
|
+
td = user.email
|
20
|
+
td = user.role.name
|
21
|
+
td = fae_date_format user.last_sign_in_at if user.last_sign_in_at.present?
|
22
|
+
td = fae_toggle user, :active unless current_user == user
|
23
|
+
td = fae_delete_button user, user unless current_user == user
|
@@ -0,0 +1 @@
|
|
1
|
+
== render 'form'
|
@@ -0,0 +1 @@
|
|
1
|
+
== render 'form'
|
@@ -0,0 +1,8 @@
|
|
1
|
+
/ Non-link tag that stands for skipped pages...
|
2
|
+
/ - available local variables
|
3
|
+
/ current_page: a page object for the currently displayed page
|
4
|
+
/ total_pages: total number of pages
|
5
|
+
/ per_page: number of items to fetch per page
|
6
|
+
/ remote: data-remote
|
7
|
+
span.page.gap
|
8
|
+
== t('views.pagination.truncate').html_safe
|
@@ -0,0 +1,9 @@
|
|
1
|
+
/ Link to the "Next" page
|
2
|
+
/ - available local variables
|
3
|
+
/ url: url to the next page
|
4
|
+
/ current_page: a page object for the currently displayed page
|
5
|
+
/ total_pages: total number of pages
|
6
|
+
/ per_page: number of items to fetch per page
|
7
|
+
/ remote: data-remote
|
8
|
+
span.next
|
9
|
+
a href=url rel="next" remote=remote data-page=(current_page + 1) = t('views.pagination.next').html_safe
|
@@ -0,0 +1,15 @@
|
|
1
|
+
/ Link showing page number
|
2
|
+
/ - available local variables
|
3
|
+
/ page: a page object for "this" page
|
4
|
+
/ url: url to this page
|
5
|
+
/ current_page: a page object for the currently displayed page
|
6
|
+
/ total_pages: total number of pages
|
7
|
+
/ per_page: number of items to fetch per page
|
8
|
+
/ remote: data-remote
|
9
|
+
- if page.current?
|
10
|
+
span.page.current
|
11
|
+
== page.number
|
12
|
+
- else
|
13
|
+
- rel = page.next? ? 'next' : page.prev? ? 'prev' : nil
|
14
|
+
span.page
|
15
|
+
a href=url rel=rel remote=remote data-page=page.number = page.number
|
@@ -0,0 +1,15 @@
|
|
1
|
+
/ The container tag
|
2
|
+
/ - available local variables
|
3
|
+
/ current_page: a page object for the currently displayed page
|
4
|
+
/ total_pages: total number of pages
|
5
|
+
/ per_page: number of items to fetch per page
|
6
|
+
/ remote: data-remote
|
7
|
+
/ paginator: the paginator that renders the pagination tags inside
|
8
|
+
== paginator.render do
|
9
|
+
== prev_page_tag unless current_page.first?
|
10
|
+
- each_page do |page|
|
11
|
+
- if page.left_outer? || page.right_outer? || page.inside_window?
|
12
|
+
== page_tag page
|
13
|
+
- elsif !page.was_truncated?
|
14
|
+
== gap_tag
|
15
|
+
== next_page_tag unless current_page.last?
|
@@ -0,0 +1,9 @@
|
|
1
|
+
/ Link to the "Previous" page
|
2
|
+
/ - available local variables
|
3
|
+
/ url: url to the previous page
|
4
|
+
/ current_page: a page object for the currently displayed page
|
5
|
+
/ total_pages: total number of pages
|
6
|
+
/ per_page: number of items to fetch per page
|
7
|
+
/ remote: data-remote
|
8
|
+
span.prev
|
9
|
+
a href=url rel="prev" remote=remote data-page=(current_page - 1) = t('views.pagination.previous').html_safe
|
@@ -0,0 +1,29 @@
|
|
1
|
+
doctype html
|
2
|
+
html
|
3
|
+
head
|
4
|
+
title Login | #{@option.title}
|
5
|
+
meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"
|
6
|
+
|
7
|
+
- if @option.favicon.present? && @option.favicon.asset.present?
|
8
|
+
link href=@option.favicon.asset_url rel="shortcut icon"
|
9
|
+
== stylesheet_link_tag "fae/application", media: "all"
|
10
|
+
== javascript_include_tag "fae/application"
|
11
|
+
== csrf_meta_tags
|
12
|
+
|
13
|
+
body.login-body
|
14
|
+
== render 'fae/application/flash_messages'
|
15
|
+
|
16
|
+
section.login-content
|
17
|
+
section.login-area
|
18
|
+
.login-logo
|
19
|
+
- if @option.logo.present? && @option.logo.asset.present?
|
20
|
+
= image_tag @option.logo.asset.url, alt: @option.title
|
21
|
+
- else
|
22
|
+
h1 = @option.title
|
23
|
+
|
24
|
+
== yield
|
25
|
+
|
26
|
+
footer.login-footer
|
27
|
+
.login-helper == render 'devise/shared/links' unless params[:controller] == 'fae/setup'
|
28
|
+
|
29
|
+
== render 'fae/application/credit'
|
@@ -0,0 +1,23 @@
|
|
1
|
+
doctype html
|
2
|
+
html
|
3
|
+
head
|
4
|
+
title = page_title
|
5
|
+
meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"
|
6
|
+
- if @option.favicon.present? && @option.favicon.asset.present?
|
7
|
+
link href=@option.favicon.asset_url rel="shortcut icon"
|
8
|
+
== stylesheet_link_tag 'fae/application', media: 'all'
|
9
|
+
== javascript_include_tag 'fae/application'
|
10
|
+
== csrf_meta_tags
|
11
|
+
|
12
|
+
body class=body_class
|
13
|
+
== render 'mobilenav'
|
14
|
+
== render 'header'
|
15
|
+
section.main-content#js-main-content
|
16
|
+
== render 'sidenav'
|
17
|
+
|
18
|
+
== yield
|
19
|
+
|
20
|
+
footer.main-footer#js-footer
|
21
|
+
== render 'credit'
|
22
|
+
|
23
|
+
== render 'markdown_helper'
|
data/config/deploy.rb
ADDED
@@ -0,0 +1,73 @@
|
|
1
|
+
set :application, 'fae'
|
2
|
+
set :repo_url, 'git@github.com:wearefine/fae.git'
|
3
|
+
|
4
|
+
set :scm, :git
|
5
|
+
|
6
|
+
# set :format, :pretty
|
7
|
+
# set :log_level, :debug
|
8
|
+
# set :pty, true
|
9
|
+
|
10
|
+
# set :linked_files, %w{config/database.yml}
|
11
|
+
set :linked_dirs, %w{ tmp/pids }
|
12
|
+
|
13
|
+
set :rvm_type, :system
|
14
|
+
|
15
|
+
set :keep_releases, 5
|
16
|
+
|
17
|
+
# variable for forked version of capistrano-rails
|
18
|
+
set :rails_path, 'spec/dummy'
|
19
|
+
|
20
|
+
server '54.164.40.189',
|
21
|
+
user: 'fae',
|
22
|
+
roles: %w{web app db},
|
23
|
+
port: 8022,
|
24
|
+
ssh_options: {
|
25
|
+
forward_agent: true
|
26
|
+
}
|
27
|
+
|
28
|
+
namespace :deploy do
|
29
|
+
|
30
|
+
desc 'Restart application'
|
31
|
+
task :restart do
|
32
|
+
on roles(:app), in: :sequence, wait: 5 do
|
33
|
+
# Your restart mechanism here, for example:
|
34
|
+
# execute :touch, shared_path.join('restart.txt')
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
desc 'Symlink secrets.yml'
|
39
|
+
task :symlink_secrets do
|
40
|
+
on roles(:app) do
|
41
|
+
execute "ln -s #{shared_path}/secrets.yml #{release_path}/config/secrets.yml"
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
# deploy:restart not firing, so I added this hack for now
|
46
|
+
after 'deploy:symlink:release', :restart_hack do
|
47
|
+
on roles(:app) do
|
48
|
+
execute "ln -s #{shared_path}/restart.txt #{release_path}/spec/dummy/tmp/restart.txt"
|
49
|
+
execute :touch, release_path.join('spec', 'dummy', 'tmp','restart.txt')
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
after 'deploy:symlink:release', :symlink_dummy_files do
|
54
|
+
on roles(:app) do
|
55
|
+
%w(log tmp/cache tmp/sockets public/system public/assets).each do |path|
|
56
|
+
execute "rm -rf #{release_path}/spec/dummy/#{path}"
|
57
|
+
execute "ln -s #{shared_path}/#{path} #{release_path}/spec/dummy/#{path}"
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
after :restart, :clear_cache do
|
63
|
+
on roles(:web), in: :groups, limit: 3, wait: 10 do
|
64
|
+
# Here we can do anything such as:
|
65
|
+
# within release_path do
|
66
|
+
# execute :rake, 'cache:clear'
|
67
|
+
# end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
after :finishing, 'deploy:cleanup'
|
72
|
+
|
73
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
set :stage, :prod
|
2
|
+
|
3
|
+
set :ruby_version, "ruby-2.3.1"
|
4
|
+
set :gemset, "dev.fae.afinedevelopment.com"
|
5
|
+
set :deploy_to, "/var/www/rails/fae.afinedevelopment.com/dev"
|
6
|
+
|
7
|
+
set :rails_env, 'remote_development'
|
8
|
+
|
9
|
+
set :branch, 'dev'
|
10
|
+
|
11
|
+
set :rvm_ruby_version, "#{fetch(:ruby_version)}@#{fetch(:gemset)}"
|
12
|
+
|
13
|
+
set :default_env, {
|
14
|
+
path: "/usr/local/rvm/gems/#{fetch(:rvm_ruby_version)}/bin:/usr/local/rvm/bin:/usr/local/rvm/rubies/#{fetch(:ruby_version)}/bin:$PATH",
|
15
|
+
ruby_version: fetch(:ruby_version),
|
16
|
+
gem_home: "/usr/local/rvm/gems/#{fetch(:rvm_ruby_version)}",
|
17
|
+
gem_path: "/usr/local/rvm/gems/#{fetch(:rvm_ruby_version)}",
|
18
|
+
bundle_path: "/usr/local/rvm/gems/#{fetch(:rvm_ruby_version)}/bin" # If you are using bundler.
|
19
|
+
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
set :stage, :prod
|
2
|
+
|
3
|
+
set :ruby_version, "ruby-2.3.1"
|
4
|
+
set :gemset, "fae.afinedevelopment.com"
|
5
|
+
set :deploy_to, "/var/www/rails/fae.afinedevelopment.com/prod"
|
6
|
+
|
7
|
+
set :rails_env, 'production'
|
8
|
+
|
9
|
+
set :branch, 'master'
|
10
|
+
|
11
|
+
set :rvm_ruby_version, "#{fetch(:ruby_version)}@#{fetch(:gemset)}"
|
12
|
+
|
13
|
+
set :default_env, {
|
14
|
+
path: "/usr/local/rvm/gems/#{fetch(:rvm_ruby_version)}/bin:/usr/local/rvm/bin:/usr/local/rvm/rubies/#{fetch(:ruby_version)}/bin:$PATH",
|
15
|
+
ruby_version: fetch(:ruby_version),
|
16
|
+
gem_home: "/usr/local/rvm/gems/#{fetch(:rvm_ruby_version)}",
|
17
|
+
gem_path: "/usr/local/rvm/gems/#{fetch(:rvm_ruby_version)}",
|
18
|
+
bundle_path: "/usr/local/rvm/gems/#{fetch(:rvm_ruby_version)}/bin" # If you are using bundler.
|
19
|
+
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
set :stage, :stage
|
2
|
+
|
3
|
+
set :ruby_version, "ruby-2.3.1"
|
4
|
+
set :gemset, "stage.fae.afinedevelopment.com"
|
5
|
+
set :deploy_to, "/var/www/rails/fae.afinedevelopment.com/stage"
|
6
|
+
|
7
|
+
set :rails_env, 'stage'
|
8
|
+
|
9
|
+
set :branch, 'stage'
|
10
|
+
|
11
|
+
set :rvm_ruby_version, "#{fetch(:ruby_version)}@#{fetch(:gemset)}"
|
12
|
+
|
13
|
+
set :default_env, {
|
14
|
+
path: "/usr/local/rvm/gems/#{fetch(:rvm_ruby_version)}/bin:/usr/local/rvm/bin:/usr/local/rvm/rubies/#{fetch(:ruby_version)}/bin:$PATH",
|
15
|
+
ruby_version: fetch(:ruby_version),
|
16
|
+
gem_home: "/usr/local/rvm/gems/#{fetch(:rvm_ruby_version)}",
|
17
|
+
gem_path: "/usr/local/rvm/gems/#{fetch(:rvm_ruby_version)}",
|
18
|
+
bundle_path: "/usr/local/rvm/gems/#{fetch(:rvm_ruby_version)}/bin" # If you are using bundler.
|
19
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
Rails.application.config.assets.precompile += %w( html5shiv.js html5shiv-printshiv.js )
|
@@ -0,0 +1,258 @@
|
|
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
|
+
# The secret key used by Devise. Devise uses this key to generate
|
5
|
+
# random tokens. Changing this key will render invalid all existing
|
6
|
+
# confirmation, reset password and unlock tokens in the database.
|
7
|
+
# config.secret_key = nil
|
8
|
+
|
9
|
+
# ==> Mailer Configuration
|
10
|
+
# Configure the e-mail address which will be shown in Devise::Mailer,
|
11
|
+
# note that it will be overwritten if you use your own mailer class
|
12
|
+
# with default "from" parameter.
|
13
|
+
# config.mailer_sender = 'change-me@example.com'
|
14
|
+
|
15
|
+
# Configure the class responsible to send e-mails.
|
16
|
+
# config.mailer = 'Devise::Mailer'
|
17
|
+
|
18
|
+
# ==> ORM configuration
|
19
|
+
# Load and configure the ORM. Supports :active_record (default) and
|
20
|
+
# :mongoid (bson_ext recommended) by default. Other ORMs may be
|
21
|
+
# available as additional gems.
|
22
|
+
require 'devise/orm/active_record'
|
23
|
+
|
24
|
+
# ==> Configuration for any authentication mechanism
|
25
|
+
# Configure which keys are used when authenticating a user. The default is
|
26
|
+
# just :email. You can configure it to use [:username, :subdomain], so for
|
27
|
+
# authenticating a user, both parameters are required. Remember that those
|
28
|
+
# parameters are used only when authenticating and not when retrieving from
|
29
|
+
# session. If you need permissions, you should implement that in a before filter.
|
30
|
+
# You can also supply a hash where the value is a boolean determining whether
|
31
|
+
# or not authentication should be aborted when the value is not present.
|
32
|
+
# config.authentication_keys = [ :email ]
|
33
|
+
|
34
|
+
# Configure parameters from the request object used for authentication. Each entry
|
35
|
+
# given should be a request method and it will automatically be passed to the
|
36
|
+
# find_for_authentication method and considered in your model lookup. For instance,
|
37
|
+
# if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
|
38
|
+
# The same considerations mentioned for authentication_keys also apply to request_keys.
|
39
|
+
# config.request_keys = []
|
40
|
+
|
41
|
+
# Configure which authentication keys should be case-insensitive.
|
42
|
+
# These keys will be downcased upon creating or modifying a user and when used
|
43
|
+
# to authenticate or find a user. Default is :email.
|
44
|
+
config.case_insensitive_keys = [ :email ]
|
45
|
+
|
46
|
+
# Configure which authentication keys should have whitespace stripped.
|
47
|
+
# These keys will have whitespace before and after removed upon creating or
|
48
|
+
# modifying a user and when used to authenticate or find a user. Default is :email.
|
49
|
+
config.strip_whitespace_keys = [ :email ]
|
50
|
+
|
51
|
+
# Tell if authentication through request.params is enabled. True by default.
|
52
|
+
# It can be set to an array that will enable params authentication only for the
|
53
|
+
# given strategies, for example, `config.params_authenticatable = [:database]` will
|
54
|
+
# enable it only for database (email + password) authentication.
|
55
|
+
# config.params_authenticatable = true
|
56
|
+
|
57
|
+
# Tell if authentication through HTTP Auth is enabled. False by default.
|
58
|
+
# It can be set to an array that will enable http authentication only for the
|
59
|
+
# given strategies, for example, `config.http_authenticatable = [:database]` will
|
60
|
+
# enable it only for database authentication. The supported strategies are:
|
61
|
+
# :database = Support basic authentication with authentication key + password
|
62
|
+
# config.http_authenticatable = false
|
63
|
+
|
64
|
+
# If http headers should be returned for AJAX requests. True by default.
|
65
|
+
# config.http_authenticatable_on_xhr = true
|
66
|
+
|
67
|
+
# The realm used in Http Basic Authentication. 'Application' by default.
|
68
|
+
# config.http_authentication_realm = 'Application'
|
69
|
+
|
70
|
+
# It will change confirmation, password recovery and other workflows
|
71
|
+
# to behave the same regardless if the e-mail provided was right or wrong.
|
72
|
+
# Does not affect registerable.
|
73
|
+
# config.paranoid = true
|
74
|
+
|
75
|
+
# By default Devise will store the user in session. You can skip storage for
|
76
|
+
# particular strategies by setting this option.
|
77
|
+
# Notice that if you are skipping storage for all authentication paths, you
|
78
|
+
# may want to disable generating routes to Devise's sessions controller by
|
79
|
+
# passing skip: :sessions to `devise_for` in your config/routes.rb
|
80
|
+
config.skip_session_storage = [:http_auth]
|
81
|
+
|
82
|
+
# By default, Devise cleans up the CSRF token on authentication to
|
83
|
+
# avoid CSRF token fixation attacks. This means that, when using AJAX
|
84
|
+
# requests for sign in and sign up, you need to get a new CSRF token
|
85
|
+
# from the server. You can disable this option at your own risk.
|
86
|
+
# config.clean_up_csrf_token_on_authentication = true
|
87
|
+
|
88
|
+
# ==> Configuration for :database_authenticatable
|
89
|
+
# For bcrypt, this is the cost for hashing the password and defaults to 10. If
|
90
|
+
# using other encryptors, it sets how many times you want the password re-encrypted.
|
91
|
+
#
|
92
|
+
# Limiting the stretches to just one in testing will increase the performance of
|
93
|
+
# your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
|
94
|
+
# a value less than 10 in other environments. Note that, for bcrypt (the default
|
95
|
+
# encryptor), the cost increases exponentially with the number of stretches (e.g.
|
96
|
+
# a value of 20 is already extremely slow: approx. 60 seconds for 1 calculation).
|
97
|
+
config.stretches = Rails.env.test? ? 1 : 10
|
98
|
+
|
99
|
+
# Setup a pepper to generate the encrypted password.
|
100
|
+
# config.pepper = 'b7068c6232e51b4c4a2b9b695c2aeb937ea84d6a2a04576493141e9f804b5c979a664bdadf99f060d228a3cbd1953c9868916a62ea78fc50564304efd58bbb99'
|
101
|
+
|
102
|
+
# ==> Configuration for :confirmable
|
103
|
+
# A period that the user is allowed to access the website even without
|
104
|
+
# confirming their account. For instance, if set to 2.days, the user will be
|
105
|
+
# able to access the website for two days without confirming their account,
|
106
|
+
# access will be blocked just in the third day. Default is 0.days, meaning
|
107
|
+
# the user cannot access the website without confirming their account.
|
108
|
+
# config.allow_unconfirmed_access_for = 2.days
|
109
|
+
|
110
|
+
# A period that the user is allowed to confirm their account before their
|
111
|
+
# token becomes invalid. For example, if set to 3.days, the user can confirm
|
112
|
+
# their account within 3 days after the mail was sent, but on the fourth day
|
113
|
+
# their account can't be confirmed with the token any more.
|
114
|
+
# Default is nil, meaning there is no restriction on how long a user can take
|
115
|
+
# before confirming their account.
|
116
|
+
# config.confirm_within = 3.days
|
117
|
+
|
118
|
+
# If true, requires any email changes to be confirmed (exactly the same way as
|
119
|
+
# initial account confirmation) to be applied. Requires additional unconfirmed_email
|
120
|
+
# db field (see migrations). Until confirmed, new email is stored in
|
121
|
+
# unconfirmed_email column, and copied to email column on successful confirmation.
|
122
|
+
config.reconfirmable = true
|
123
|
+
|
124
|
+
# Defines which key will be used when confirming an account
|
125
|
+
# config.confirmation_keys = [ :email ]
|
126
|
+
|
127
|
+
# ==> Configuration for :rememberable
|
128
|
+
# The time the user will be remembered without asking for credentials again.
|
129
|
+
# config.remember_for = 2.weeks
|
130
|
+
|
131
|
+
# If true, extends the user's remember period when remembered via cookie.
|
132
|
+
# config.extend_remember_period = false
|
133
|
+
|
134
|
+
# Options to be passed to the created cookie. For instance, you can set
|
135
|
+
# secure: true in order to force SSL only cookies.
|
136
|
+
# config.rememberable_options = {}
|
137
|
+
|
138
|
+
# ==> Configuration for :validatable
|
139
|
+
# Range for password length.
|
140
|
+
config.password_length = 8..128
|
141
|
+
|
142
|
+
# Email regex used to validate email formats. It simply asserts that
|
143
|
+
# one (and only one) @ exists in the given string. This is mainly
|
144
|
+
# to give user feedback and not to assert the e-mail validity.
|
145
|
+
# config.email_regexp = /\A[^@]+@[^@]+\z/
|
146
|
+
|
147
|
+
# ==> Configuration for :timeoutable
|
148
|
+
# The time you want to timeout the user session without activity. After this
|
149
|
+
# time the user will be asked for credentials again. Default is 30 minutes.
|
150
|
+
# config.timeout_in = 30.minutes
|
151
|
+
|
152
|
+
# If true, expires auth token on session timeout.
|
153
|
+
# config.expire_auth_token_on_timeout = false
|
154
|
+
|
155
|
+
# ==> Configuration for :lockable
|
156
|
+
# Defines which strategy will be used to lock an account.
|
157
|
+
# :failed_attempts = Locks an account after a number of failed attempts to sign in.
|
158
|
+
# :none = No lock strategy. You should handle locking by yourself.
|
159
|
+
# config.lock_strategy = :failed_attempts
|
160
|
+
|
161
|
+
# Defines which key will be used when locking and unlocking an account
|
162
|
+
# config.unlock_keys = [ :email ]
|
163
|
+
|
164
|
+
# Defines which strategy will be used to unlock an account.
|
165
|
+
# :email = Sends an unlock link to the user email
|
166
|
+
# :time = Re-enables login after a certain amount of time (see :unlock_in below)
|
167
|
+
# :both = Enables both strategies
|
168
|
+
# :none = No unlock strategy. You should handle unlocking by yourself.
|
169
|
+
# config.unlock_strategy = :both
|
170
|
+
|
171
|
+
# Number of authentication tries before locking an account if lock_strategy
|
172
|
+
# is failed attempts.
|
173
|
+
# config.maximum_attempts = 20
|
174
|
+
|
175
|
+
# Time interval to unlock the account if :time is enabled as unlock_strategy.
|
176
|
+
# config.unlock_in = 1.hour
|
177
|
+
|
178
|
+
# Warn on the last attempt before the account is locked.
|
179
|
+
# config.last_attempt_warning = false
|
180
|
+
|
181
|
+
# ==> Configuration for :recoverable
|
182
|
+
#
|
183
|
+
# Defines which key will be used when recovering the password for an account
|
184
|
+
# config.reset_password_keys = [ :email ]
|
185
|
+
|
186
|
+
# Time interval you can reset your password with a reset password key.
|
187
|
+
# Don't put a too small interval or your users won't have the time to
|
188
|
+
# change their passwords.
|
189
|
+
config.reset_password_within = 6.hours
|
190
|
+
|
191
|
+
# ==> Configuration for :encryptable
|
192
|
+
# Allow you to use another encryption algorithm besides bcrypt (default). You can use
|
193
|
+
# :sha1, :sha512 or encryptors from others authentication tools as :clearance_sha1,
|
194
|
+
# :authlogic_sha512 (then you should set stretches above to 20 for default behavior)
|
195
|
+
# and :restful_authentication_sha1 (then you should set stretches to 10, and copy
|
196
|
+
# REST_AUTH_SITE_KEY to pepper).
|
197
|
+
#
|
198
|
+
# Require the `devise-encryptable` gem when using anything other than bcrypt
|
199
|
+
# config.encryptor = :sha512
|
200
|
+
|
201
|
+
# ==> Scopes configuration
|
202
|
+
# Turn scoped views on. Before rendering "sessions/new", it will first check for
|
203
|
+
# "users/sessions/new". It's turned off by default because it's slower if you
|
204
|
+
# are using only default views.
|
205
|
+
# config.scoped_views = false
|
206
|
+
|
207
|
+
# Configure the default scope given to Warden. By default it's the first
|
208
|
+
# devise role declared in your routes (usually :user).
|
209
|
+
# config.default_scope = :user
|
210
|
+
|
211
|
+
# Set this configuration to false if you want /users/sign_out to sign out
|
212
|
+
# only the current scope. By default, Devise signs out all scopes.
|
213
|
+
# config.sign_out_all_scopes = true
|
214
|
+
|
215
|
+
# ==> Navigation configuration
|
216
|
+
# Lists the formats that should be treated as navigational. Formats like
|
217
|
+
# :html, should redirect to the sign in page when the user does not have
|
218
|
+
# access, but formats like :xml or :json, should return 401.
|
219
|
+
#
|
220
|
+
# If you have any extra navigational formats, like :iphone or :mobile, you
|
221
|
+
# should add them to the navigational formats lists.
|
222
|
+
#
|
223
|
+
# The "*/*" below is required to match Internet Explorer requests.
|
224
|
+
# config.navigational_formats = ['*/*', :html]
|
225
|
+
|
226
|
+
# The default HTTP method used to sign out a resource. Default is :delete.
|
227
|
+
config.sign_out_via = :delete
|
228
|
+
|
229
|
+
# ==> OmniAuth
|
230
|
+
# Add a new OmniAuth provider. Check the wiki for more information on setting
|
231
|
+
# up on your models and hooks.
|
232
|
+
# config.omniauth :github, 'APP_ID', 'APP_SECRET', scope: 'user,public_repo'
|
233
|
+
|
234
|
+
# ==> Warden configuration
|
235
|
+
# If you want to use other strategies, that are not supported by Devise, or
|
236
|
+
# change the failure app, you can configure them inside the config.warden block.
|
237
|
+
#
|
238
|
+
# config.warden do |manager|
|
239
|
+
# manager.intercept_401 = false
|
240
|
+
# manager.default_strategies(scope: :user).unshift :some_external_strategy
|
241
|
+
# end
|
242
|
+
|
243
|
+
# ==> Mountable engine configurations
|
244
|
+
# When using Devise inside an engine, let's call it `MyEngine`, and this engine
|
245
|
+
# is mountable, there are some extra configurations to be taken into account.
|
246
|
+
# The following options are available, assuming the engine is mounted as:
|
247
|
+
#
|
248
|
+
# mount MyEngine, at: '/my_engine'
|
249
|
+
#
|
250
|
+
# The router that invoked `devise_for`, in the example above, would be:
|
251
|
+
config.router_name = :fae
|
252
|
+
# Set Fae as parent_controller
|
253
|
+
config.parent_controller = 'Fae::ApplicationController'
|
254
|
+
#
|
255
|
+
# When using omniauth, Devise cannot automatically set Omniauth path,
|
256
|
+
# so you need to do it manually. For the users scope, it would be:
|
257
|
+
# config.omniauth_path_prefix = '/my_engine/users/auth'
|
258
|
+
end
|