fat_free_crm 0.18.2 → 0.19.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of fat_free_crm might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.rubocop_todo.yml +61 -160
- data/.travis.yml +27 -11
- data/CHANGELOG.md +40 -24
- data/CONTRIBUTORS.md +1 -0
- data/Dockerfile +45 -14
- data/Gemfile +16 -10
- data/Gemfile.lock +230 -222
- data/Procfile +1 -1
- data/README.md +2 -2
- data/Rakefile +1 -1
- data/app/assets/stylesheets/common.scss +1 -1
- data/app/controllers/admin/application_controller.rb +1 -1
- data/app/controllers/admin/field_groups_controller.rb +1 -3
- data/app/controllers/admin/tags_controller.rb +1 -3
- data/app/controllers/admin/users_controller.rb +5 -8
- data/app/controllers/application_controller.rb +11 -45
- data/app/controllers/comments_controller.rb +2 -5
- data/{config/initializers/authlogic.rb → app/controllers/confirmations_controller.rb} +4 -2
- data/app/controllers/emails_controller.rb +0 -2
- data/app/controllers/entities/accounts_controller.rb +1 -3
- data/app/controllers/entities/campaigns_controller.rb +1 -3
- data/app/controllers/entities/contacts_controller.rb +4 -24
- data/app/controllers/entities/leads_controller.rb +7 -10
- data/app/controllers/entities/opportunities_controller.rb +4 -14
- data/app/controllers/entities_controller.rb +21 -7
- data/app/controllers/home_controller.rb +2 -4
- data/app/controllers/passwords_controller.rb +3 -59
- data/{spec/features/support/maintain_sessions.rb → app/controllers/registrations_controller.rb} +12 -5
- data/{lib/development_tasks/gem.rake → app/controllers/sessions_controller.rb} +6 -6
- data/app/controllers/tasks_controller.rb +8 -17
- data/app/controllers/users_controller.rb +8 -29
- data/app/helpers/admin/users_helper.rb +1 -1
- data/app/helpers/application_helper.rb +27 -32
- data/app/helpers/campaigns_helper.rb +1 -1
- data/app/helpers/contacts_helper.rb +1 -3
- data/app/helpers/opportunities_helper.rb +4 -12
- data/app/helpers/tasks_helper.rb +1 -1
- data/app/helpers/users_helper.rb +1 -3
- data/{config/initializers/paper_trail.rb → app/mailers/devise_mailer.rb} +5 -1
- data/app/mailers/user_mailer.rb +0 -9
- data/app/models/entities/account.rb +10 -10
- data/app/models/entities/campaign.rb +4 -6
- data/app/models/entities/contact.rb +24 -12
- data/app/models/entities/lead.rb +7 -7
- data/app/models/entities/opportunity.rb +7 -9
- data/app/models/fields/custom_field.rb +1 -0
- data/app/models/fields/custom_field_date_pair.rb +2 -0
- data/app/models/fields/field.rb +1 -3
- data/app/models/list.rb +1 -1
- data/app/models/observers/entity_observer.rb +3 -7
- data/app/models/observers/lead_observer.rb +2 -4
- data/app/models/observers/opportunity_observer.rb +2 -4
- data/app/models/observers/task_observer.rb +1 -1
- data/app/models/polymorphic/email.rb +2 -2
- data/app/models/polymorphic/task.rb +13 -9
- data/app/models/polymorphic/version.rb +3 -2
- data/app/models/setting.rb +2 -0
- data/app/models/users/permission.rb +3 -3
- data/app/models/users/preference.rb +2 -1
- data/app/models/users/user.rb +67 -42
- data/app/views/accounts/_top_section.html.haml +1 -1
- data/app/views/accounts/edit.js.haml +1 -1
- data/app/views/accounts/update.js.haml +2 -2
- data/app/views/admin/users/_user.html.haml +4 -4
- data/app/views/contacts/_index_brief.html.haml +1 -1
- data/app/views/contacts/_index_full.html.haml +1 -1
- data/app/views/contacts/_index_long.html.haml +1 -1
- data/app/views/devise/confirmations/new.html.haml +9 -0
- data/app/views/devise/mailer/confirmation_instructions.html.haml +4 -0
- data/app/views/devise/mailer/password_change.html.haml +3 -0
- data/app/views/devise/mailer/reset_password_instructions.html.haml +6 -0
- data/app/views/devise/passwords/edit.html.haml +18 -0
- data/app/views/devise/passwords/new.html.haml +10 -0
- data/app/views/devise/registrations/new.html.haml +21 -0
- data/app/views/devise/sessions/new.html.haml +32 -0
- data/app/views/layouts/_about.html.haml +5 -5
- data/app/views/layouts/_header.html.haml +3 -3
- data/app/views/layouts/admin/_header.html.haml +1 -1
- data/app/views/shared/_address.html.haml +5 -5
- data/app/views/shared/_paginate_with_per_page.html.haml +1 -0
- data/app/views/users/_avatar.html.haml +1 -1
- data/bin/bundle +1 -1
- data/bin/rails +1 -1
- data/bin/setup +38 -0
- data/bin/update +33 -0
- data/bin/yarn +13 -0
- data/config/application.rb +8 -6
- data/config/boot.rb +1 -1
- data/config/brakeman.ignore +2 -2
- data/config/database.postgres.docker.yml +5 -5
- data/config/environment.rb +1 -1
- data/config/environments/development.rb +1 -0
- data/config/environments/test.rb +7 -0
- data/config/initializers/action_mailer.rb +1 -3
- data/config/initializers/application_controller_renderer.rb +9 -0
- data/config/initializers/assets.rb +6 -11
- data/config/initializers/backtrace_silencers.rb +0 -6
- data/config/initializers/content_security_policy.rb +26 -0
- data/config/initializers/cookies_serializer.rb +3 -6
- data/config/initializers/devise.rb +289 -0
- data/config/initializers/filter_parameter_logging.rb +0 -5
- data/config/initializers/gravatar.rb +0 -1
- data/config/initializers/inflections.rb +0 -6
- data/config/initializers/mime_types.rb +1 -9
- data/config/initializers/new_framework_defaults_5_2.rb +40 -0
- data/config/initializers/relative_url_root.rb +1 -3
- data/config/initializers/session_store.rb +1 -3
- data/config/initializers/wrap_parameters.rb +4 -9
- data/config/locales/fat_free_crm.en-GB.yml +5 -5
- data/config/locales/fat_free_crm.en-US.yml +5 -5
- data/config/locales/fat_free_crm.fr.yml +1 -1
- data/config/locales/fat_free_crm.ru.yml +1 -0
- data/config/routes.rb +20 -9
- data/db/demo/users.yml +62 -81
- data/db/migrate/20100928030620_remove_uuid.rb +1 -2
- data/db/migrate/20120316045804_activities_to_versions.rb +1 -0
- data/db/migrate/20120510025219_add_not_null_constraints_for_timestamp_columns.rb +1 -0
- data/db/migrate/20180107082701_authlogic_to_devise.rb +58 -0
- data/db/schema.rb +48 -43
- data/docker-compose.yml +10 -0
- data/fat_free_crm.gemspec +11 -13
- data/lib/development_tasks/license.rake +2 -2
- data/lib/fat_free_crm/callback.rb +2 -2
- data/lib/fat_free_crm/comment_extensions.rb +2 -4
- data/lib/fat_free_crm/core_ext/string.rb +1 -1
- data/lib/fat_free_crm/engine.rb +1 -1
- data/lib/fat_free_crm/errors.rb +1 -1
- data/lib/fat_free_crm/export_csv.rb +1 -0
- data/lib/fat_free_crm/exportable.rb +1 -1
- data/lib/fat_free_crm/fields.rb +1 -1
- data/lib/fat_free_crm/gem_dependencies.rb +1 -1
- data/lib/fat_free_crm/gem_ext/simple_form/action_view_extensions/form_helper.rb +1 -3
- data/lib/fat_free_crm/i18n.rb +2 -2
- data/lib/fat_free_crm/mail_processor/base.rb +4 -10
- data/lib/fat_free_crm/mail_processor/dropbox.rb +5 -15
- data/lib/fat_free_crm/permissions.rb +7 -4
- data/lib/fat_free_crm/sortable.rb +1 -1
- data/lib/fat_free_crm/tabs.rb +2 -2
- data/lib/fat_free_crm/version.rb +2 -2
- data/lib/gravatar_image_tag.rb +7 -8
- data/lib/missing_translation_detector.rb +1 -0
- data/lib/tasks/ffcrm/missing_translations.rake +1 -0
- data/lib/tasks/ffcrm/setup.rake +10 -1
- data/lib/tasks/ffcrm/update_data.rake +2 -2
- data/script/rails +2 -2
- data/spec/controllers/admin/users_controller_spec.rb +0 -56
- data/spec/controllers/comments_controller_spec.rb +6 -6
- data/spec/controllers/entities/campaigns_controller_spec.rb +1 -1
- data/spec/controllers/entities/contacts_controller_spec.rb +2 -1
- data/spec/controllers/entities/leads_controller_spec.rb +2 -2
- data/spec/controllers/entities/opportunities_controller_spec.rb +1 -1
- data/spec/controllers/entities_controller_spec.rb +5 -0
- data/spec/controllers/home_controller_spec.rb +5 -5
- data/spec/controllers/tasks_controller_spec.rb +6 -4
- data/spec/controllers/users_controller_spec.rb +28 -98
- data/spec/factories/account_factories.rb +5 -5
- data/spec/factories/campaign_factories.rb +3 -3
- data/spec/factories/contact_factories.rb +8 -8
- data/spec/factories/field_factories.rb +4 -3
- data/spec/factories/lead_factories.rb +5 -5
- data/spec/factories/list_factories.rb +2 -2
- data/spec/factories/opportunity_factories.rb +3 -3
- data/spec/factories/setting_factories.rb +2 -2
- data/spec/factories/shared_factories.rb +11 -9
- data/spec/factories/task_factories.rb +7 -7
- data/spec/factories/user_factories.rb +16 -19
- data/spec/features/admin/groups_spec.rb +1 -1
- data/spec/features/admin/users_spec.rb +3 -1
- data/spec/features/campaigns_spec.rb +1 -1
- data/spec/features/contacts_spec.rb +1 -1
- data/spec/features/dashboard_spec.rb +1 -1
- data/spec/features/devise/sign_in_spec.rb +58 -0
- data/spec/features/devise/sign_up_spec.rb +36 -0
- data/spec/features/leads_spec.rb +1 -1
- data/spec/features/opportunities_overview_spec.rb +1 -1
- data/spec/features/opportunities_spec.rb +3 -3
- data/spec/features/support/browser.rb +2 -1
- data/spec/features/tasks_spec.rb +1 -1
- data/spec/helpers/admin/field_groups_helper_spec.rb +1 -1
- data/spec/helpers/users_helper_spec.rb +4 -4
- data/spec/lib/comment_extensions_spec.rb +10 -4
- data/spec/lib/errors_spec.rb +2 -2
- data/spec/lib/mail_processor/dropbox_spec.rb +1 -1
- data/spec/lib/mail_processor/sample_emails/dropbox.rb +8 -8
- data/spec/lib/permissions_spec.rb +8 -3
- data/spec/mailers/devise_mailer_spec.rb +35 -0
- data/spec/mailers/user_mailer_spec.rb +0 -26
- data/spec/models/entities/account_spec.rb +27 -0
- data/spec/models/entities/contact_spec.rb +96 -1
- data/spec/models/fields/custom_field_date_pair_spec.rb +4 -2
- data/spec/models/fields/custom_field_spec.rb +4 -2
- data/spec/models/observers/entity_observer_spec.rb +1 -1
- data/spec/models/polymorphic/version_spec.rb +7 -7
- data/spec/models/users/user_spec.rb +22 -26
- data/spec/routing/users_routing_spec.rb +30 -8
- data/spec/shared/controllers.rb +3 -9
- data/spec/spec_helper.rb +10 -2
- data/spec/support/assert_select.rb +1 -0
- data/spec/support/devise_helpers.rb +28 -0
- data/spec/{features/support/helpers.rb → support/feature_helpers.rb} +10 -10
- data/spec/support/macros.rb +4 -1
- data/spec/views/contacts/update.js.haml_spec.rb +1 -1
- data/spec/views/opportunities/update.js.haml_spec.rb +1 -1
- data/vendor/gems/ransack_ui-1.3.4/.gitignore +17 -0
- data/vendor/gems/ransack_ui-1.3.4/Gemfile +7 -0
- data/vendor/gems/ransack_ui-1.3.4/LICENSE.txt +22 -0
- data/vendor/gems/ransack_ui-1.3.4/README.md +57 -0
- data/vendor/gems/ransack_ui-1.3.4/Rakefile +1 -0
- data/vendor/gems/ransack_ui-1.3.4/app/assets/images/ransack_ui/calendar.png +0 -0
- data/vendor/gems/ransack_ui-1.3.4/app/assets/images/ransack_ui/delete.png +0 -0
- data/vendor/gems/ransack_ui-1.3.4/app/assets/javascripts/ransack/predicates.js.coffee +41 -0
- data/vendor/gems/ransack_ui-1.3.4/app/assets/javascripts/ransack_ui_bootstrap/button_group_select.js.coffee +26 -0
- data/vendor/gems/ransack_ui-1.3.4/app/assets/javascripts/ransack_ui_bootstrap/index.js.coffee +2 -0
- data/vendor/gems/ransack_ui-1.3.4/app/assets/javascripts/ransack_ui_jquery/index.js +2 -0
- data/vendor/gems/ransack_ui-1.3.4/app/assets/javascripts/ransack_ui_jquery/search_form.js.coffee.erb +499 -0
- data/vendor/gems/ransack_ui-1.3.4/app/assets/stylesheets/ransack_ui_bootstrap/index.css +3 -0
- data/vendor/gems/ransack_ui-1.3.4/app/assets/stylesheets/ransack_ui_bootstrap/search.css.scss +41 -0
- data/vendor/gems/ransack_ui-1.3.4/app/views/ransack_ui/_condition_fields.html.erb +15 -0
- data/vendor/gems/ransack_ui-1.3.4/app/views/ransack_ui/_grouping_fields.html.erb +16 -0
- data/vendor/gems/ransack_ui-1.3.4/app/views/ransack_ui/_search.html.erb +29 -0
- data/vendor/gems/ransack_ui-1.3.4/app/views/ransack_ui/_sort_fields.html.erb +4 -0
- data/vendor/gems/ransack_ui-1.3.4/config/locales/en.yml +24 -0
- data/vendor/gems/ransack_ui-1.3.4/lib/ransack_ui.rb +9 -0
- data/vendor/gems/ransack_ui-1.3.4/lib/ransack_ui/adapters/active_record.rb +6 -0
- data/vendor/gems/ransack_ui-1.3.4/lib/ransack_ui/adapters/active_record/base.rb +46 -0
- data/vendor/gems/ransack_ui-1.3.4/lib/ransack_ui/controller_helpers.rb +18 -0
- data/vendor/gems/ransack_ui-1.3.4/lib/ransack_ui/rails/engine.rb +21 -0
- data/vendor/gems/ransack_ui-1.3.4/lib/ransack_ui/ransack_overrides/adapters/active_record/base.rb +47 -0
- data/vendor/gems/ransack_ui-1.3.4/lib/ransack_ui/ransack_overrides/configuration.rb +15 -0
- data/vendor/gems/ransack_ui-1.3.4/lib/ransack_ui/ransack_overrides/context.rb +9 -0
- data/vendor/gems/ransack_ui-1.3.4/lib/ransack_ui/ransack_overrides/helpers/form_builder.rb +262 -0
- data/vendor/gems/ransack_ui-1.3.4/lib/ransack_ui/ransack_overrides/nodes/attribute.rb +13 -0
- data/vendor/gems/ransack_ui-1.3.4/lib/ransack_ui/ransack_overrides/nodes/condition.rb +13 -0
- data/vendor/gems/ransack_ui-1.3.4/lib/ransack_ui/ransack_overrides/nodes/grouping.rb +20 -0
- data/vendor/gems/ransack_ui-1.3.4/lib/ransack_ui/version.rb +3 -0
- data/vendor/gems/ransack_ui-1.3.4/lib/ransack_ui/view_helpers.rb +30 -0
- data/vendor/gems/ransack_ui-1.3.4/ransack_ui.gemspec +23 -0
- metadata +79 -67
- data/app/controllers/authentications_controller.rb +0 -53
- data/app/models/users/authentication.rb +0 -56
- data/app/views/authentications/new.html.haml +0 -19
- data/app/views/passwords/edit.html.haml +0 -15
- data/app/views/passwords/new.html.haml +0 -10
- data/app/views/user_mailer/password_reset_instructions.html.haml +0 -6
- data/app/views/users/new.html.haml +0 -19
- data/spec/controllers/authentications_controller_spec.rb +0 -150
- data/spec/controllers/passwords_controller_spec.rb +0 -32
- data/spec/models/users/authentication_spec.rb +0 -19
- data/spec/support/auth_macros.rb +0 -49
- data/spec/views/authentications/new.haml_spec.rb +0 -31
@@ -1,14 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright (c) 2008-2013 Michael Dvorkin and contributors.
|
4
|
-
#
|
5
|
-
# Fat Free CRM is freely distributable under the terms of MIT license.
|
6
|
-
# See MIT-LICENSE file or http://www.opensource.org/licenses/mit-license.php
|
7
|
-
#------------------------------------------------------------------------------
|
8
3
|
# Be sure to restart your server when you modify this file.
|
9
4
|
|
10
5
|
# Add new mime types for use in respond_to blocks:
|
11
|
-
|
12
|
-
# Mime::Type.register_alias "text/html", :iphone
|
13
|
-
|
14
|
-
Mime::Type.register "application/vnd.ms-excel", :xls
|
6
|
+
Mime::Type.register "application/vnd.msexcel", :xls
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Be sure to restart your server when you modify this file.
|
4
|
+
#
|
5
|
+
# This file contains migration options to ease your Rails 5.2 upgrade.
|
6
|
+
#
|
7
|
+
# Once upgraded flip defaults one by one to migrate to the new default.
|
8
|
+
#
|
9
|
+
# Read the Guide for Upgrading Ruby on Rails for more info on each option.
|
10
|
+
|
11
|
+
# Make Active Record use stable #cache_key alongside new #cache_version method.
|
12
|
+
# This is needed for recyclable cache keys.
|
13
|
+
# Rails.application.config.active_record.cache_versioning = true
|
14
|
+
|
15
|
+
# Use AES-256-GCM authenticated encryption for encrypted cookies.
|
16
|
+
# Also, embed cookie expiry in signed or encrypted cookies for increased security.
|
17
|
+
#
|
18
|
+
# This option is not backwards compatible with earlier Rails versions.
|
19
|
+
# It's best enabled when your entire app is migrated and stable on 5.2.
|
20
|
+
#
|
21
|
+
# Existing cookies will be converted on read then written with the new scheme.
|
22
|
+
# Rails.application.config.action_dispatch.use_authenticated_cookie_encryption = true
|
23
|
+
|
24
|
+
# Use AES-256-GCM authenticated encryption as default cipher for encrypting messages
|
25
|
+
# instead of AES-256-CBC, when use_authenticated_message_encryption is set to true.
|
26
|
+
# Rails.application.config.active_support.use_authenticated_message_encryption = true
|
27
|
+
|
28
|
+
# Add default protection from forgery to ActionController::Base instead of in
|
29
|
+
# ApplicationController.
|
30
|
+
# Rails.application.config.action_controller.default_protect_from_forgery = true
|
31
|
+
|
32
|
+
# Store boolean values are in sqlite3 databases as 1 and 0 instead of 't' and
|
33
|
+
# 'f' after migrating old data.
|
34
|
+
Rails.application.config.active_record.sqlite3.represent_boolean_as_integer = true
|
35
|
+
|
36
|
+
# Use SHA-1 instead of MD5 to generate non-sensitive digests, such as the ETag header.
|
37
|
+
# Rails.application.config.active_support.use_sha1_digests = true
|
38
|
+
|
39
|
+
# Make `form_with` generate id attributes for any generated HTML tags.
|
40
|
+
# Rails.application.config.action_view.form_with_generates_ids = true
|
@@ -7,6 +7,4 @@
|
|
7
7
|
#------------------------------------------------------------------------------
|
8
8
|
# Set relative url root for assets
|
9
9
|
|
10
|
-
if Setting.base_url.present?
|
11
|
-
ActionController::Base.relative_url_root = Setting.base_url
|
12
|
-
end
|
10
|
+
ActionController::Base.relative_url_root = Setting.base_url if Setting.base_url.present?
|
@@ -7,6 +7,4 @@
|
|
7
7
|
#------------------------------------------------------------------------------
|
8
8
|
# Be sure to restart your server when you modify this file.
|
9
9
|
|
10
|
-
if FatFreeCRM.application?
|
11
|
-
Rails.application.config.session_store :cookie_store, key: '_fat_free_crm_session'
|
12
|
-
end
|
10
|
+
Rails.application.config.session_store :cookie_store, key: '_fat_free_crm_session' if FatFreeCRM.application?
|
@@ -1,10 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright (c) 2008-2013 Michael Dvorkin and contributors.
|
4
|
-
#
|
5
|
-
# Fat Free CRM is freely distributable under the terms of MIT license.
|
6
|
-
# See MIT-LICENSE file or http://www.opensource.org/licenses/mit-license.php
|
7
|
-
#------------------------------------------------------------------------------
|
8
3
|
# Be sure to restart your server when you modify this file.
|
9
4
|
|
10
5
|
# This file contains settings for ActionController::ParamsWrapper which
|
@@ -12,10 +7,10 @@
|
|
12
7
|
|
13
8
|
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
14
9
|
ActiveSupport.on_load(:action_controller) do
|
15
|
-
wrap_parameters format: [:json]
|
10
|
+
wrap_parameters format: [:json]
|
16
11
|
end
|
17
12
|
|
18
13
|
# To enable root element in JSON for ActiveRecord objects.
|
19
|
-
ActiveSupport.on_load(:active_record) do
|
20
|
-
|
21
|
-
end
|
14
|
+
# ActiveSupport.on_load(:active_record) do
|
15
|
+
# self.include_root_in_json = true
|
16
|
+
# end
|
@@ -593,10 +593,10 @@ en-GB:
|
|
593
593
|
|
594
594
|
# Views -> Common.
|
595
595
|
#----------------------------------------------------------------------------
|
596
|
-
add_note: Add
|
597
|
-
save_note: Save
|
598
|
-
add_note_help: Add a new
|
599
|
-
edit_note: Edit
|
596
|
+
add_note: Add Comment
|
597
|
+
save_note: Save Comment
|
598
|
+
add_note_help: Add a new comment...
|
599
|
+
edit_note: Edit Comment
|
600
600
|
added_ago: added %{value}
|
601
601
|
added_by: added %{time_ago} by %{user}
|
602
602
|
back: Back
|
@@ -682,7 +682,7 @@ en-GB:
|
|
682
682
|
notifications_tooltip: Subscribers will receive new comments via email
|
683
683
|
subscribe_via_email: Subscribe via email
|
684
684
|
disable_email_subscriptions: Disable email subscription
|
685
|
-
added_note: added
|
685
|
+
added_note: added comment %{value}
|
686
686
|
|
687
687
|
# Views -> Emails.
|
688
688
|
#----------------------------------------------------------------------------
|
@@ -593,10 +593,10 @@ en-US:
|
|
593
593
|
|
594
594
|
# Views -> Common.
|
595
595
|
#----------------------------------------------------------------------------
|
596
|
-
add_note: Add
|
597
|
-
save_note: Save
|
598
|
-
add_note_help: Add a new
|
599
|
-
edit_note: Edit
|
596
|
+
add_note: Add Comment
|
597
|
+
save_note: Save Comment
|
598
|
+
add_note_help: Add a new comment...
|
599
|
+
edit_note: Edit Comment
|
600
600
|
added_ago: added %{value}
|
601
601
|
added_by: added %{time_ago} by %{user}
|
602
602
|
back: Back
|
@@ -682,7 +682,7 @@ en-US:
|
|
682
682
|
notifications_tooltip: Subscribers will receive new comments via email
|
683
683
|
subscribe_via_email: Subscribe via email
|
684
684
|
disable_email_subscriptions: Disable email subscription
|
685
|
-
added_note: added
|
685
|
+
added_note: added comment %{value}
|
686
686
|
|
687
687
|
# Views -> Emails.
|
688
688
|
#----------------------------------------------------------------------------
|
@@ -699,6 +699,7 @@ ru:
|
|
699
699
|
search_results_count:
|
700
700
|
one: Найден %{count} результат.
|
701
701
|
other: Найдено %{count} результатов.
|
702
|
+
many: Найдено %{count} результатов.
|
702
703
|
|
703
704
|
# Views -> Comments.
|
704
705
|
#----------------------------------------------------------------------------
|
data/config/routes.rb
CHANGED
@@ -10,12 +10,26 @@ Rails.application.routes.draw do
|
|
10
10
|
|
11
11
|
root to: 'home#index'
|
12
12
|
|
13
|
+
# Deprecated: Compatibility with legacy Authlogic routes
|
14
|
+
get '/login', to: redirect('/users/sign_in')
|
15
|
+
get '/signup', to: redirect('/users/sign_up')
|
16
|
+
|
17
|
+
devise_for :users, controllers: { registrations: 'registrations',
|
18
|
+
sessions: 'sessions',
|
19
|
+
passwords: 'passwords',
|
20
|
+
confirmations: 'confirmations' }
|
21
|
+
|
22
|
+
devise_scope :user do
|
23
|
+
resources :users, only: %i[index show] do
|
24
|
+
collection do
|
25
|
+
get :opportunities_overview
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
13
30
|
get 'activities' => 'home#index'
|
14
|
-
get 'admin' => 'admin/users#index', :
|
15
|
-
get '
|
16
|
-
delete 'logout' => 'authentications#destroy', :as => :logout
|
17
|
-
get 'profile' => 'users#show', :as => :profile
|
18
|
-
get 'signup' => 'users#new', :as => :signup
|
31
|
+
get 'admin' => 'admin/users#index', as: :admin
|
32
|
+
get 'profile' => 'users#show', as: :profile
|
19
33
|
|
20
34
|
get '/home/options', as: :options
|
21
35
|
get '/home/toggle', as: :toggle
|
@@ -23,10 +37,8 @@ Rails.application.routes.draw do
|
|
23
37
|
match '/home/timezone', as: :timezone, via: %i[get put post]
|
24
38
|
post '/home/redraw', as: :redraw
|
25
39
|
|
26
|
-
resource :authentication, except: %i[index edit]
|
27
40
|
resources :comments, except: %i[new show]
|
28
41
|
resources :emails, only: [:destroy]
|
29
|
-
resources :passwords, only: %i[new create edit update]
|
30
42
|
|
31
43
|
resources :accounts, id: /\d+/ do
|
32
44
|
collection do
|
@@ -139,7 +151,7 @@ Rails.application.routes.draw do
|
|
139
151
|
end
|
140
152
|
end
|
141
153
|
|
142
|
-
resources :users, id: /\d+/, except: %i[index destroy] do
|
154
|
+
resources :users, id: /\d+/, except: %i[index destroy create] do
|
143
155
|
member do
|
144
156
|
get :avatar
|
145
157
|
get :password
|
@@ -149,7 +161,6 @@ Rails.application.routes.draw do
|
|
149
161
|
end
|
150
162
|
collection do
|
151
163
|
match :auto_complete, via: %i[get post]
|
152
|
-
get :opportunities_overview
|
153
164
|
end
|
154
165
|
end
|
155
166
|
|
data/db/demo/users.yml
CHANGED
@@ -16,21 +16,18 @@
|
|
16
16
|
# yahoo :string(32)
|
17
17
|
# google :string(32)
|
18
18
|
# skype :string(32)
|
19
|
-
#
|
19
|
+
# encrypted_password :string(255) default(""), not null
|
20
20
|
# password_salt :string(255) default(""), not null
|
21
|
-
#
|
22
|
-
#
|
23
|
-
#
|
24
|
-
#
|
25
|
-
#
|
26
|
-
# current_login_ip :string(255)
|
27
|
-
# login_count :integer default(0), not null
|
21
|
+
# last_sign_in_at :datetime
|
22
|
+
# current_sign_in_at :datetime
|
23
|
+
# last_sign_in_ip :string(255)
|
24
|
+
# current_sign_in_ip :string(255)
|
25
|
+
# sign_in_count :integer default(0), not null
|
28
26
|
# deleted_at :datetime
|
29
27
|
# created_at :datetime
|
30
28
|
# updated_at :datetime
|
31
29
|
# admin :boolean default(FALSE), not null
|
32
30
|
# suspended_at :datetime
|
33
|
-
# single_access_token :string(255)
|
34
31
|
#
|
35
32
|
|
36
33
|
<%
|
@@ -48,19 +45,17 @@ aaron:
|
|
48
45
|
phone: (800)555-1210
|
49
46
|
mobile: (800)555-1211
|
50
47
|
admin: true
|
51
|
-
|
48
|
+
encrypted_password: 56d91c9f1a9c549304768982fd4e2d8bc2700b403b4524c0f14136dbbe2ce4cd923156ad69f9acce8305dba4e63faa884e61fb7a256cf8f5fc7c2ce176e68e8f
|
52
49
|
password_salt: ce6e0200c96f4dd326b91f3967115a31421a0e7dcddc9ffb63a77f598a9fcb5326fe532dbd9836a2446e46840d398fa32c81f8f4da1a0fcfe931989e9639a013
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
last_login_ip: 127.0.0.1
|
59
|
-
current_login_ip: 127.0.0.1
|
60
|
-
login_count: <%= 1 + rand(100) %>
|
50
|
+
last_sign_in_at: <%= login = Date.today - rand(15).days %>
|
51
|
+
current_sign_in_at:
|
52
|
+
last_sign_in_ip: 127.0.0.1
|
53
|
+
current_sign_in_ip: 127.0.0.1
|
54
|
+
sign_in_count: <%= 1 + rand(100) %>
|
61
55
|
deleted_at:
|
62
56
|
created_at: <%= login - rand(5).days %>
|
63
57
|
updated_at: <%= login + rand(5).days %>
|
58
|
+
confirmed_at: <%= Time.now.utc %>
|
64
59
|
|
65
60
|
ben:
|
66
61
|
id: 2
|
@@ -74,19 +69,17 @@ ben:
|
|
74
69
|
phone: (800)555-1220
|
75
70
|
mobile: (800)555-1221
|
76
71
|
admin: true
|
77
|
-
|
72
|
+
encrypted_password: 3b23bde6e4f766450a36f30c5076db4164ab4edf957fe602858086feb833251149a2505b8ec00330fa6d9b531ff32ec7619b2b413b5c5380007c4a021f3546c2
|
78
73
|
password_salt: fce13d8b784003b4fb8d030866b5c3a003a914b9d52832d02b5f85db53413bcc8dd078d3e57e6c50b9bb8e8eb520e04a5f79cfb089a8bbe224e15e840b0dc594
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
last_login_ip: 127.0.0.1
|
85
|
-
current_login_ip: 127.0.0.1
|
86
|
-
login_count: <%= 1 + rand(100) %>
|
74
|
+
last_sign_in_at: <%= login = Date.today - rand(15).days %>
|
75
|
+
current_sign_in_at:
|
76
|
+
last_sign_in_ip: 127.0.0.1
|
77
|
+
current_sign_in_ip: 127.0.0.1
|
78
|
+
sign_in_count: <%= 1 + rand(100) %>
|
87
79
|
deleted_at:
|
88
80
|
created_at: <%= login - rand(5).days %>
|
89
81
|
updated_at: <%= login + rand(5).days %>
|
82
|
+
confirmed_at: <%= Time.now.utc %>
|
90
83
|
|
91
84
|
cindy:
|
92
85
|
id: 3
|
@@ -100,19 +93,17 @@ cindy:
|
|
100
93
|
phone: (800)555-1230
|
101
94
|
mobile: (800)555-1231
|
102
95
|
admin: true
|
103
|
-
|
96
|
+
encrypted_password: f323dc706086eeffee9997239f6fdfbd13ef0f62b0817cea1ef199912a64601e05e3a6c9074d2248b22e9e4ce5c817a9d9339839c2ae9502c9c1350f267f7b1f
|
104
97
|
password_salt: bc41b1a96c66ac155c79cf68ff3a16dd97d4730bc3476575fcab3c2ae7751776cc48e6faa036961be40ed04a27690b6f5189234968d4a6fff981105f040d9014
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
last_login_ip: 127.0.0.1
|
111
|
-
current_login_ip: 127.0.0.1
|
112
|
-
login_count: <%= 1 + rand(100) %>
|
98
|
+
last_sign_in_at: <%= login = Date.today - rand(15).days %>
|
99
|
+
current_sign_in_at:
|
100
|
+
last_sign_in_ip: 127.0.0.1
|
101
|
+
current_sign_in_ip: 127.0.0.1
|
102
|
+
sign_in_count: <%= 1 + rand(100) %>
|
113
103
|
deleted_at:
|
114
104
|
created_at: <%= login - rand(5).days %>
|
115
105
|
updated_at: <%= login + rand(5).days %>
|
106
|
+
confirmed_at: <%= Time.now.utc %>
|
116
107
|
|
117
108
|
dan:
|
118
109
|
id: 4
|
@@ -126,19 +117,17 @@ dan:
|
|
126
117
|
phone: (800)555-1240
|
127
118
|
mobile: (800)555-1241
|
128
119
|
admin: true
|
129
|
-
|
120
|
+
encrypted_password: 508f242629443dae3777e945d59213e7f81084be9f8c71b6d06b81295e9ffac145a3c2a8870cc17598e2a7908e2107f838d29ae275cfbe4a135c67c4f27e2e58
|
130
121
|
password_salt: e01633b1b2396fa3be0f689b87d68a55a831c043faffba0401131338e6aab5a8492a0b47a6947f0d96dd7188f51ecc530a2d72603802c7b409f1c42ce138de0b
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
last_login_ip: 127.0.0.1
|
137
|
-
current_login_ip: 127.0.0.1
|
138
|
-
login_count: <%= 1 + rand(100) %>
|
122
|
+
last_sign_in_at: <%= login = Date.today - rand(15).days %>
|
123
|
+
current_sign_in_at:
|
124
|
+
last_sign_in_ip: 127.0.0.1
|
125
|
+
current_sign_in_ip: 127.0.0.1
|
126
|
+
sign_in_count: <%= 1 + rand(100) %>
|
139
127
|
deleted_at:
|
140
128
|
created_at: <%= login - rand(5).days %>
|
141
129
|
updated_at: <%= login + rand(5).days %>
|
130
|
+
confirmed_at: <%= Time.now.utc %>
|
142
131
|
|
143
132
|
elizabeth:
|
144
133
|
id: 5
|
@@ -152,19 +141,17 @@ elizabeth:
|
|
152
141
|
phone: (800)555-1250
|
153
142
|
mobile: (800)555-1251
|
154
143
|
admin: true
|
155
|
-
|
144
|
+
encrypted_password: 5e90a6f2f5be66010c8a0eb6f2089780f453d1400e3aa4d271520f8e2a2e26d00d98d3ae2ba36854b897cbbe1f51343f4e9ce96dd4da8705ba3db5bd8b0ed0e7
|
156
145
|
password_salt: 80caf26a2981892f70acbc0ddb8fdd19c789163bfdefa3809355aef4bd989c8c6aa251c05b0923ef307e7b5269b6efdca380b0c28b8bf8f72ee5385a8557ed9b
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
last_login_ip: 127.0.0.1
|
163
|
-
current_login_ip: 127.0.0.1
|
164
|
-
login_count: <%= 1 + rand(100) %>
|
146
|
+
last_sign_in_at: <%= login = Date.today - rand(15).days %>
|
147
|
+
current_sign_in_at:
|
148
|
+
last_sign_in_ip: 127.0.0.1
|
149
|
+
current_sign_in_ip: 127.0.0.1
|
150
|
+
sign_in_count: <%= 1 + rand(100) %>
|
165
151
|
deleted_at:
|
166
152
|
created_at: <%= login - rand(5).days %>
|
167
153
|
updated_at: <%= login + rand(5).days %>
|
154
|
+
confirmed_at: <%= Time.now.utc %>
|
168
155
|
|
169
156
|
frank:
|
170
157
|
id: 6
|
@@ -178,19 +165,17 @@ frank:
|
|
178
165
|
phone: (800)555-1260
|
179
166
|
mobile: (800)555-1261
|
180
167
|
admin: true
|
181
|
-
|
168
|
+
encrypted_password: 1471e9dc79b636f465a529d89460fcefc8dbb0d2a14308349bd060d00dab4d35f1d91d201dbe37da4aa8c18a4430a09a6bca5babe05fb18ef3f02342dcf4e4ca
|
182
169
|
password_salt: 805983077fdba9438de1d84007e093f658620211e1d0087d33662a5ca387b04206d098e152aeea896ab65aa026ac1fb9ce69dbe22a45fb9b21c3b6dcad4909f3
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
last_login_ip: 127.0.0.1
|
189
|
-
current_login_ip: 127.0.0.1
|
190
|
-
login_count: <%= 1 + rand(100) %>
|
170
|
+
last_sign_in_at: <%= login = Date.today - rand(15).days %>
|
171
|
+
current_sign_in_at:
|
172
|
+
last_sign_in_ip: 127.0.0.1
|
173
|
+
current_sign_in_ip: 127.0.0.1
|
174
|
+
sign_in_count: <%= 1 + rand(100) %>
|
191
175
|
deleted_at:
|
192
176
|
created_at: <%= login - rand(5).days %>
|
193
177
|
updated_at: <%= login + rand(5).days %>
|
178
|
+
confirmed_at: <%= Time.now.utc %>
|
194
179
|
|
195
180
|
george:
|
196
181
|
id: 7
|
@@ -204,19 +189,17 @@ george:
|
|
204
189
|
phone: (800)555-1270
|
205
190
|
mobile: (800)555-1271
|
206
191
|
admin: true
|
207
|
-
|
192
|
+
encrypted_password: 23ed19767095ab24c1c560393b5a577455ab49d595781f931905f0df072533c485b1902337ffb426dae1e70889557f5b531da8e7b782a0575cc7bd419d6a91b9
|
208
193
|
password_salt: 80b5c87fb4c9fa5c50815016bc0160eb08c4e22e88fee558b5e739557d5178c61b06fcbebf6c4c62f37f0f7984ccc0d025e2f073880cd655b57542343e4981b6
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
last_login_ip: 127.0.0.1
|
215
|
-
current_login_ip: 127.0.0.1
|
216
|
-
login_count: <%= 1 + rand(100) %>
|
194
|
+
last_sign_in_at: <%= login = Date.today - rand(15).days %>
|
195
|
+
current_sign_in_at:
|
196
|
+
last_sign_in_ip: 127.0.0.1
|
197
|
+
current_sign_in_ip: 127.0.0.1
|
198
|
+
sign_in_count: <%= 1 + rand(100) %>
|
217
199
|
deleted_at:
|
218
200
|
created_at: <%= login - rand(5).days %>
|
219
201
|
updated_at: <%= login + rand(5).days %>
|
202
|
+
confirmed_at: <%= Time.now.utc %>
|
220
203
|
|
221
204
|
heather:
|
222
205
|
id: 8
|
@@ -230,16 +213,14 @@ heather:
|
|
230
213
|
phone: (800)555-1280
|
231
214
|
mobile: (800)555-1281
|
232
215
|
admin: true
|
233
|
-
|
216
|
+
encrypted_password: cdd2e9ec69c553c1f690b885c1cd1fd4e976c94a28693b793eba41796b0a96ce6f7cdd05ded8a84b30a96a37d18ad7fddd7435314bd612d033ead1c43bcde4d2
|
234
217
|
password_salt: 729ab318245afa827a8c29e36c885c7b0d07e15193727b68a7cf5edac517e4d6fcafa4e5ddfff9c9305d3ccd37ef735823ba66ba8e2876fd2b06c7c27f3c9482
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
last_login_ip: 127.0.0.1
|
241
|
-
current_login_ip: 127.0.0.1
|
242
|
-
login_count: <%= 1 + rand(100) %>
|
218
|
+
last_sign_in_at: <%= login = Date.today - rand(15).days %>
|
219
|
+
current_sign_in_at:
|
220
|
+
last_sign_in_ip: 127.0.0.1
|
221
|
+
current_sign_in_ip: 127.0.0.1
|
222
|
+
sign_in_count: <%= 1 + rand(100) %>
|
243
223
|
deleted_at:
|
244
224
|
created_at: <%= login - rand(5).days %>
|
245
225
|
updated_at: <%= login + rand(5).days %>
|
226
|
+
confirmed_at: <%= Time.now.utc %>
|