fat_free_crm 0.16.4 → 0.17.1
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 +5 -5
- data/.gitignore +1 -0
- data/.rubocop.yml +44 -5
- data/.rubocop_todo.yml +23 -359
- data/.travis.yml +21 -21
- data/CHANGELOG.md +42 -9
- data/Capfile +2 -0
- data/Gemfile +4 -1
- data/Gemfile.lock +27 -25
- data/Guardfile +2 -0
- data/README.md +5 -5
- data/Rakefile +2 -0
- data/Vagrantfile +92 -0
- data/app/assets/javascripts/application.js.erb +0 -2
- data/app/assets/javascripts/crm.js.coffee +16 -20
- data/app/assets/stylesheets/application.css.erb +0 -2
- data/app/controllers/admin/application_controller.rb +3 -1
- data/app/controllers/admin/field_groups_controller.rb +2 -0
- data/app/controllers/admin/fields_controller.rb +4 -5
- data/app/controllers/admin/groups_controller.rb +2 -0
- data/app/controllers/admin/plugins_controller.rb +3 -7
- data/app/controllers/admin/settings_controller.rb +3 -5
- data/app/controllers/admin/tags_controller.rb +3 -5
- data/app/controllers/admin/users_controller.rb +4 -2
- data/app/controllers/application_controller.rb +16 -16
- data/app/controllers/authentications_controller.rb +4 -2
- data/app/controllers/comments_controller.rb +5 -4
- data/app/controllers/emails_controller.rb +2 -0
- data/app/controllers/entities/accounts_controller.rb +14 -7
- data/app/controllers/entities/campaigns_controller.rb +15 -8
- data/app/controllers/entities/contacts_controller.rb +28 -21
- data/app/controllers/entities/leads_controller.rb +33 -22
- data/app/controllers/entities/opportunities_controller.rb +33 -26
- data/app/controllers/entities_controller.rb +15 -1
- data/app/controllers/home_controller.rb +10 -5
- data/app/controllers/lists_controller.rb +3 -5
- data/app/controllers/passwords_controller.rb +3 -1
- data/app/controllers/tasks_controller.rb +11 -9
- data/app/controllers/users_controller.rb +4 -1
- data/app/helpers/accounts_helper.rb +14 -19
- data/app/helpers/addresses_helper.rb +2 -0
- data/app/helpers/admin/application_helper.rb +3 -2
- data/app/helpers/admin/field_groups_helper.rb +2 -0
- data/app/helpers/admin/fields_helper.rb +2 -0
- data/app/helpers/admin/plugins_helper.rb +2 -0
- data/app/helpers/admin/settings_helper.rb +2 -0
- data/app/helpers/admin/tags_helper.rb +2 -0
- data/app/helpers/admin/users_helper.rb +37 -17
- data/app/helpers/application_helper.rb +62 -68
- data/app/helpers/authentications_helper.rb +2 -0
- data/app/helpers/campaigns_helper.rb +3 -1
- data/app/helpers/comments_helper.rb +2 -0
- data/app/helpers/contacts_helper.rb +5 -3
- data/app/helpers/emails_helper.rb +2 -0
- data/app/helpers/fields_helper.rb +2 -0
- data/app/helpers/groups_helper.rb +2 -0
- data/app/helpers/home_helper.rb +2 -0
- data/app/helpers/javascript_helper.rb +2 -0
- data/app/helpers/leads_helper.rb +4 -3
- data/app/helpers/lists_helper.rb +2 -0
- data/app/helpers/opportunities_helper.rb +11 -11
- data/app/helpers/passwords_helper.rb +2 -0
- data/app/helpers/remote_link_pagination_helper.rb +2 -0
- data/app/helpers/tags_helper.rb +4 -2
- data/app/helpers/tasks_helper.rb +11 -10
- data/app/helpers/users_helper.rb +3 -1
- data/app/helpers/versions_helper.rb +2 -0
- data/app/inputs/date_pair_input.rb +2 -0
- data/app/inputs/date_time_input.rb +2 -0
- data/app/inputs/datetime_pair_input.rb +2 -0
- data/app/inputs/text_input.rb +2 -0
- data/app/mailers/dropbox_mailer.rb +2 -0
- data/app/mailers/subscription_mailer.rb +14 -8
- data/app/mailers/user_mailer.rb +3 -2
- data/app/models/entities/account.rb +17 -9
- data/app/models/entities/account_contact.rb +3 -1
- data/app/models/entities/account_opportunity.rb +3 -1
- data/app/models/entities/campaign.rb +3 -1
- data/app/models/entities/contact.rb +9 -7
- data/app/models/entities/contact_opportunity.rb +2 -0
- data/app/models/entities/lead.rb +3 -1
- data/app/models/entities/opportunity.rb +3 -1
- data/app/models/fields/core_field.rb +3 -0
- data/app/models/fields/custom_field.rb +8 -5
- data/app/models/fields/custom_field_date_pair.rb +3 -1
- data/app/models/fields/custom_field_datetime_pair.rb +3 -1
- data/app/models/fields/custom_field_pair.rb +2 -0
- data/app/models/fields/field.rb +9 -4
- data/app/models/fields/field_group.rb +3 -1
- data/app/models/list.rb +2 -0
- data/app/models/observers/entity_observer.rb +2 -0
- data/app/models/observers/lead_observer.rb +3 -1
- data/app/models/observers/opportunity_observer.rb +5 -3
- data/app/models/observers/task_observer.rb +2 -0
- data/app/models/polymorphic/address.rb +2 -0
- data/app/models/polymorphic/avatar.rb +2 -0
- data/app/models/polymorphic/comment.rb +2 -0
- data/app/models/polymorphic/email.rb +2 -0
- data/app/models/polymorphic/tag.rb +2 -0
- data/app/models/polymorphic/tagging.rb +2 -0
- data/app/models/polymorphic/task.rb +9 -8
- data/app/models/polymorphic/version.rb +3 -1
- data/app/models/setting.rb +16 -0
- data/app/models/users/ability.rb +2 -0
- data/app/models/users/authentication.rb +2 -0
- data/app/models/users/group.rb +2 -0
- data/app/models/users/permission.rb +2 -0
- data/app/models/users/preference.rb +2 -0
- data/app/models/users/user.rb +15 -15
- data/app/views/accounts/_account.html.haml +3 -3
- data/app/views/accounts/_contact_info.html.haml +7 -7
- data/app/views/accounts/_edit.html.haml +8 -8
- data/app/views/accounts/_index_brief.html.haml +11 -11
- data/app/views/accounts/_index_long.html.haml +12 -12
- data/app/views/accounts/_new.html.haml +9 -9
- data/app/views/accounts/_sidebar_index.html.haml +5 -5
- data/app/views/accounts/_sidebar_show.html.haml +11 -11
- data/app/views/accounts/_title_bar.html.haml +2 -2
- data/app/views/accounts/_top_section.html.haml +8 -8
- data/app/views/accounts/create.js.haml +3 -3
- data/app/views/accounts/destroy.js.haml +1 -1
- data/app/views/accounts/edit.js.haml +4 -4
- data/app/views/accounts/index.js.haml +4 -4
- data/app/views/accounts/index.xls.builder +3 -1
- data/app/views/accounts/new.js.haml +1 -1
- data/app/views/accounts/show.html.haml +8 -8
- data/app/views/accounts/show.js.haml +1 -1
- data/app/views/accounts/update.js.haml +2 -2
- data/app/views/admin/custom_fields/_base_field.html.haml +4 -2
- data/app/views/admin/custom_fields/_check_boxes_field.html.haml +2 -2
- data/app/views/admin/custom_fields/_date_field.html.haml +1 -1
- data/app/views/admin/custom_fields/_date_pair_field.html.haml +2 -2
- data/app/views/admin/custom_fields/_datetime_field.html.haml +1 -1
- data/app/views/admin/custom_fields/_datetime_pair_field.html.haml +2 -2
- data/app/views/admin/custom_fields/_radio_field.html.haml +2 -2
- data/app/views/admin/custom_fields/_select_field.html.haml +1 -1
- data/app/views/admin/custom_fields/_string_field.html.haml +1 -1
- data/app/views/admin/field_groups/_confirm.html.haml +1 -1
- data/app/views/admin/field_groups/_edit.html.haml +3 -3
- data/app/views/admin/field_groups/_field_group.html.haml +9 -9
- data/app/views/admin/field_groups/_new.html.haml +4 -4
- data/app/views/admin/field_groups/_top_section.html.haml +3 -3
- data/app/views/admin/field_groups/confirm.js.haml +1 -1
- data/app/views/admin/field_groups/create.js.haml +2 -2
- data/app/views/admin/field_groups/edit.js.haml +1 -1
- data/app/views/admin/field_groups/new.js.haml +1 -1
- data/app/views/admin/field_groups/update.js.haml +1 -1
- data/app/views/admin/fields/_field.html.haml +4 -4
- data/app/views/admin/fields/_form.html.haml +10 -10
- data/app/views/admin/fields/_subform.html.haml +2 -2
- data/app/views/admin/fields/create.js.haml +2 -2
- data/app/views/admin/fields/edit.js.haml +1 -1
- data/app/views/admin/fields/index.html.haml +6 -6
- data/app/views/admin/fields/show.html.haml +1 -1
- data/app/views/admin/fields/update.js.haml +2 -2
- data/app/views/admin/groups/_edit.html.haml +3 -3
- data/app/views/admin/groups/_form.html.haml +1 -1
- data/app/views/admin/groups/_group.html.haml +4 -4
- data/app/views/admin/groups/_new.html.haml +3 -3
- data/app/views/admin/groups/create.js.haml +2 -2
- data/app/views/admin/groups/edit.js.haml +2 -2
- data/app/views/admin/groups/index.html.haml +3 -3
- data/app/views/admin/groups/index.js.haml +2 -2
- data/app/views/admin/groups/new.js.haml +1 -1
- data/app/views/admin/groups/update.js.haml +2 -2
- data/app/views/admin/plugins/_plugin.html.haml +1 -1
- data/app/views/admin/tags/_confirm.html.haml +2 -2
- data/app/views/admin/tags/_edit.html.haml +3 -3
- data/app/views/admin/tags/_new.html.haml +3 -3
- data/app/views/admin/tags/_tag.html.haml +4 -4
- data/app/views/admin/tags/confirm.js.haml +1 -1
- data/app/views/admin/tags/create.js.haml +2 -2
- data/app/views/admin/tags/edit.js.haml +3 -3
- data/app/views/admin/tags/index.html.haml +3 -3
- data/app/views/admin/tags/new.js.haml +1 -1
- data/app/views/admin/tags/update.js.haml +2 -2
- data/app/views/admin/users/_confirm.html.haml +1 -1
- data/app/views/admin/users/_edit.html.haml +3 -3
- data/app/views/admin/users/_new.html.haml +3 -3
- data/app/views/admin/users/_profile.html.haml +3 -3
- data/app/views/admin/users/_user.html.haml +16 -16
- data/app/views/admin/users/confirm.js.haml +1 -1
- data/app/views/admin/users/create.js.haml +2 -2
- data/app/views/admin/users/edit.js.haml +3 -3
- data/app/views/admin/users/index.html.haml +3 -3
- data/app/views/admin/users/index.js.haml +2 -2
- data/app/views/admin/users/new.js.haml +1 -1
- data/app/views/admin/users/reactivate.js.haml +1 -1
- data/app/views/admin/users/suspend.js.haml +1 -1
- data/app/views/admin/users/update.js.haml +2 -2
- data/app/views/application/_auto_complete.html.haml +3 -3
- data/app/views/application/index.atom.builder +10 -6
- data/app/views/application/index.rss.builder +3 -1
- data/app/views/application/show.atom.builder +11 -7
- data/app/views/application/show.rss.builder +4 -2
- data/app/views/authentications/new.html.haml +1 -1
- data/app/views/campaigns/_campaign.html.haml +3 -3
- data/app/views/campaigns/_edit.html.haml +7 -7
- data/app/views/campaigns/_index_brief.html.haml +3 -3
- data/app/views/campaigns/_index_long.html.haml +5 -5
- data/app/views/campaigns/_metrics.html.haml +5 -5
- data/app/views/campaigns/_new.html.haml +8 -8
- data/app/views/campaigns/_objectives.html.haml +6 -6
- data/app/views/campaigns/_sidebar_index.html.haml +5 -5
- data/app/views/campaigns/_sidebar_show.html.haml +10 -10
- data/app/views/campaigns/_status.html.haml +1 -1
- data/app/views/campaigns/_title_bar.html.haml +2 -2
- data/app/views/campaigns/_top_section.html.haml +9 -9
- data/app/views/campaigns/create.js.haml +3 -3
- data/app/views/campaigns/destroy.js.haml +1 -1
- data/app/views/campaigns/edit.js.haml +4 -4
- data/app/views/campaigns/index.js.haml +4 -4
- data/app/views/campaigns/index.xls.builder +22 -20
- data/app/views/campaigns/new.js.haml +1 -1
- data/app/views/campaigns/show.html.haml +9 -9
- data/app/views/campaigns/show.js.haml +1 -1
- data/app/views/campaigns/update.js.haml +2 -2
- data/app/views/comments/_comment.html.haml +5 -5
- data/app/views/comments/_edit.html.haml +5 -5
- data/app/views/comments/_new.html.haml +15 -15
- data/app/views/comments/_subscription_links.html.haml +3 -3
- data/app/views/comments/create.js.haml +1 -1
- data/app/views/comments/edit.js.haml +2 -2
- data/app/views/comments/update.js.haml +2 -2
- data/app/views/contacts/_contact.html.haml +3 -3
- data/app/views/contacts/_contacts.html.haml +2 -2
- data/app/views/contacts/_edit.html.haml +9 -9
- data/app/views/contacts/_extra.html.haml +3 -3
- data/app/views/contacts/_index_brief.html.haml +3 -3
- data/app/views/contacts/_index_full.html.haml +11 -11
- data/app/views/contacts/_index_long.html.haml +5 -5
- data/app/views/contacts/_new.html.haml +10 -10
- data/app/views/contacts/_section_extra.html.haml +1 -1
- data/app/views/contacts/_section_general.html.haml +1 -1
- data/app/views/contacts/_sidebar_show.html.haml +8 -8
- data/app/views/contacts/_title_bar.html.haml +2 -2
- data/app/views/contacts/_top_section.html.haml +9 -9
- data/app/views/contacts/create.js.haml +4 -4
- data/app/views/contacts/destroy.js.haml +2 -2
- data/app/views/contacts/edit.js.haml +4 -4
- data/app/views/contacts/index.js.haml +4 -4
- data/app/views/contacts/index.xls.builder +3 -1
- data/app/views/contacts/new.js.haml +1 -1
- data/app/views/contacts/show.html.haml +7 -7
- data/app/views/contacts/show.js.haml +1 -1
- data/app/views/contacts/update.js.haml +3 -3
- data/app/views/emails/_email.html.haml +6 -6
- data/app/views/entities/_basic_search.html.haml +3 -3
- data/app/views/entities/_permissions.html.haml +10 -10
- data/app/views/entities/_search.html.haml +6 -6
- data/app/views/entities/_section_custom_fields.html.haml +3 -3
- data/app/views/entities/_title_bar.html.haml +3 -3
- data/app/views/entities/attach.js.haml +2 -2
- data/app/views/entities/contacts.js.haml +2 -2
- data/app/views/entities/leads.js.haml +2 -2
- data/app/views/entities/opportunities.js.haml +2 -2
- data/app/views/entities/subscription_update.js.haml +1 -1
- data/app/views/entities/versions.js.haml +2 -2
- data/app/views/fields/_edit_custom_field_group.html.haml +2 -2
- data/app/views/fields/_group.html.haml +5 -5
- data/app/views/fields/_group_table.html.haml +2 -2
- data/app/views/fields/_groups.html.haml +1 -1
- data/app/views/fields/_sidebar_show.html.haml +1 -1
- data/app/views/fields/group.js.erb +1 -1
- data/app/views/home/_account.html.haml +11 -11
- data/app/views/home/_activity.html.haml +7 -7
- data/app/views/home/_assets_menu.html.haml +1 -1
- data/app/views/home/_opportunity.html.haml +8 -8
- data/app/views/home/_options.html.haml +2 -2
- data/app/views/home/_task.html.haml +7 -7
- data/app/views/home/index.atom.builder +5 -3
- data/app/views/home/index.html.haml +6 -6
- data/app/views/home/index.js.haml +3 -3
- data/app/views/home/index.rss.builder +2 -0
- data/app/views/home/options.js.haml +1 -1
- data/app/views/layouts/500.html.haml +2 -2
- data/app/views/layouts/_footer.html.haml +1 -1
- data/app/views/layouts/_header.html.haml +3 -3
- data/app/views/layouts/_jumpbox.html.haml +1 -1
- data/app/views/layouts/_tabbed.html.haml +4 -4
- data/app/views/layouts/_tabless.html.haml +1 -1
- data/app/views/layouts/admin/_header.html.haml +3 -3
- data/app/views/layouts/admin/application.html.haml +5 -5
- data/app/views/layouts/application.html.haml +3 -3
- data/app/views/layouts/header.xls.builder +2 -0
- data/app/views/leads/_contact.html.haml +2 -2
- data/app/views/leads/_convert.html.haml +2 -2
- data/app/views/leads/_convert_permissions.html.haml +10 -10
- data/app/views/leads/_edit.html.haml +10 -10
- data/app/views/leads/_index_brief.html.haml +6 -6
- data/app/views/leads/_index_long.html.haml +7 -7
- data/app/views/leads/_lead.html.haml +3 -3
- data/app/views/leads/_leads.html.haml +2 -2
- data/app/views/leads/_new.html.haml +11 -11
- data/app/views/leads/_opportunity.html.haml +6 -6
- data/app/views/leads/_sidebar_index.html.haml +5 -5
- data/app/views/leads/_sidebar_show.html.haml +13 -13
- data/app/views/leads/_status.html.haml +7 -7
- data/app/views/leads/_title_bar.html.haml +3 -3
- data/app/views/leads/_top_section.html.haml +8 -8
- data/app/views/leads/convert.js.haml +4 -4
- data/app/views/leads/create.js.haml +3 -3
- data/app/views/leads/destroy.js.haml +1 -1
- data/app/views/leads/edit.js.haml +4 -4
- data/app/views/leads/index.js.haml +4 -4
- data/app/views/leads/index.xls.builder +3 -1
- data/app/views/leads/new.js.haml +1 -1
- data/app/views/leads/promote.js.haml +4 -4
- data/app/views/leads/reject.js.haml +1 -1
- data/app/views/leads/show.html.haml +6 -6
- data/app/views/leads/show.js.haml +1 -1
- data/app/views/leads/update.js.haml +3 -3
- data/app/views/lists/_lists.html.haml +2 -2
- data/app/views/lists/_sidebar.html.haml +8 -8
- data/app/views/opportunities/_edit.html.haml +7 -7
- data/app/views/opportunities/_index_brief.html.haml +4 -4
- data/app/views/opportunities/_index_long.html.haml +11 -11
- data/app/views/opportunities/_new.html.haml +8 -8
- data/app/views/opportunities/_opportunities.html.haml +2 -2
- data/app/views/opportunities/_opportunity.html.haml +3 -3
- data/app/views/opportunities/_sidebar_index.html.haml +5 -5
- data/app/views/opportunities/_sidebar_show.html.haml +12 -12
- data/app/views/opportunities/_title_bar.html.haml +2 -2
- data/app/views/opportunities/_top_section.html.haml +14 -14
- data/app/views/opportunities/contacts.js.haml +2 -2
- data/app/views/opportunities/create.js.haml +4 -4
- data/app/views/opportunities/destroy.js.haml +2 -2
- data/app/views/opportunities/edit.js.haml +4 -4
- data/app/views/opportunities/index.js.haml +4 -4
- data/app/views/opportunities/index.xls.builder +3 -1
- data/app/views/opportunities/new.js.haml +1 -1
- data/app/views/opportunities/show.html.haml +7 -7
- data/app/views/opportunities/show.js.haml +1 -1
- data/app/views/opportunities/update.js.haml +3 -3
- data/app/views/passwords/edit.html.haml +2 -2
- data/app/views/passwords/new.html.haml +1 -1
- data/app/views/shared/_address.html.haml +3 -3
- data/app/views/shared/_comment.html.haml +1 -1
- data/app/views/shared/_edit_comment.html.haml +5 -5
- data/app/views/shared/_empty.html.haml +1 -1
- data/app/views/shared/_paginate_with_per_page.html.haml +1 -1
- data/app/views/shared/_recent.html.haml +2 -2
- data/app/views/shared/_recently.html.haml +1 -1
- data/app/views/shared/_search.html.haml +2 -2
- data/app/views/shared/_tags.html.haml +2 -2
- data/app/views/shared/_tasks.html.haml +5 -5
- data/app/views/subscription_mailer/comment_notification.text.erb +2 -2
- data/app/views/tasks/_assigned.html.haml +4 -4
- data/app/views/tasks/_completed.html.haml +2 -2
- data/app/views/tasks/_edit.html.haml +4 -4
- data/app/views/tasks/_empty.html.haml +1 -1
- data/app/views/tasks/_new.html.haml +3 -3
- data/app/views/tasks/_pending.html.haml +7 -7
- data/app/views/tasks/_related.html.haml +2 -2
- data/app/views/tasks/_selector.html.haml +4 -4
- data/app/views/tasks/_sidebar_index.html.haml +7 -7
- data/app/views/tasks/_title.html.haml +2 -2
- data/app/views/tasks/_top_section.html.haml +9 -9
- data/app/views/tasks/complete.js.haml +2 -2
- data/app/views/tasks/create.js.haml +6 -6
- data/app/views/tasks/edit.js.haml +3 -3
- data/app/views/tasks/index.html.haml +4 -4
- data/app/views/tasks/index.xls.builder +5 -3
- data/app/views/tasks/new.js.haml +1 -1
- data/app/views/tasks/update.js.haml +1 -1
- data/app/views/users/_avatar.html.haml +5 -5
- data/app/views/users/_password.html.haml +3 -3
- data/app/views/users/_profile.html.haml +10 -10
- data/app/views/users/_user.html.haml +3 -3
- data/app/views/users/_user_report.html.haml +2 -2
- data/app/views/users/avatar.js.haml +1 -1
- data/app/views/users/change_password.js.haml +1 -1
- data/app/views/users/edit.js.haml +1 -1
- data/app/views/users/new.html.haml +2 -2
- data/app/views/users/opportunities_overview.html.haml +2 -2
- data/app/views/users/password.js.haml +1 -1
- data/app/views/users/show.html.haml +4 -4
- data/app/views/users/update.js.haml +4 -2
- data/app/views/users/upload_avatar.js.haml +2 -2
- data/app/views/versions/_version.html.haml +3 -3
- data/app/views/versions/_version_item.html.haml +3 -3
- data/app/views/versions/_versions.html.haml +2 -2
- data/bin/bundle +2 -0
- data/bin/rails +3 -1
- data/bin/rake +2 -0
- data/config.ru +3 -1
- data/config/application.rb +2 -0
- data/config/boot.rb +2 -0
- data/config/brakeman.ignore +139 -0
- data/config/deploy.example.rb +2 -0
- data/config/environment.rb +2 -0
- data/config/environments/development.rb +2 -0
- data/config/environments/production.rb +2 -0
- data/config/environments/staging.rb +2 -0
- data/config/environments/test.rb +2 -0
- data/config/initializers/action_mailer.rb +2 -0
- data/config/initializers/assets.rb +3 -1
- data/config/initializers/authlogic.rb +2 -0
- data/config/initializers/backtrace_silencers.rb +2 -0
- data/config/initializers/constants.rb +2 -0
- data/config/initializers/cookies_serializer.rb +2 -0
- data/config/initializers/custom_field_ransack_translations.rb +2 -0
- data/config/initializers/filter_parameter_logging.rb +2 -0
- data/config/initializers/gravatar.rb +2 -0
- data/config/initializers/inflections.rb +2 -0
- data/config/initializers/locale.rb +2 -0
- data/config/initializers/mime_types.rb +2 -0
- data/config/initializers/paginate_arrays.rb +2 -0
- data/config/initializers/paper_trail.rb +2 -0
- data/config/initializers/ransack.rb +2 -0
- data/config/initializers/relative_url_root.rb +2 -0
- data/config/initializers/secret_token.rb +2 -0
- data/config/initializers/session_store.rb +2 -0
- data/config/initializers/simple_form.rb +2 -0
- data/config/initializers/views.rb +3 -2
- data/config/initializers/wrap_parameters.rb +2 -0
- data/config/locales/fat_free_crm.de.yml +1 -0
- data/config/locales/fat_free_crm.en-GB.yml +7 -5
- data/config/locales/fat_free_crm.en-US.yml +7 -5
- data/config/locales/fat_free_crm.es-CL.yml +2 -1
- data/config/locales/fat_free_crm.es.yml +17 -16
- data/config/locales/fat_free_crm.fr.yml +1 -0
- data/config/locales/fat_free_crm.ja.yml +555 -184
- data/config/locales/fat_free_crm.nl.yml +2 -1
- data/config/locales/fat_free_crm.pt-BR.yml +1 -0
- data/config/locales/fat_free_crm.ru.yml +1 -0
- data/config/puma.rb +2 -0
- data/config/routes.rb +3 -1
- data/custom_plan.rb +2 -0
- data/db/demo/accounts.yml +1 -1
- data/db/demo/emails.yml +1 -1
- data/db/migrate/20100928030598_create_sessions.rb +2 -0
- data/db/migrate/20100928030599_create_users.rb +3 -1
- data/db/migrate/20100928030600_create_openid_tables.rb +3 -1
- data/db/migrate/20100928030601_create_accounts.rb +2 -0
- data/db/migrate/20100928030602_create_permissions.rb +4 -2
- data/db/migrate/20100928030603_create_settings.rb +2 -0
- data/db/migrate/20100928030604_create_preferences.rb +2 -0
- data/db/migrate/20100928030605_create_campaigns.rb +3 -1
- data/db/migrate/20100928030606_create_leads.rb +3 -1
- data/db/migrate/20100928030607_create_contacts.rb +3 -1
- data/db/migrate/20100928030608_create_opportunities.rb +3 -1
- data/db/migrate/20100928030609_create_account_contacts.rb +2 -0
- data/db/migrate/20100928030610_create_account_opportunities.rb +2 -0
- data/db/migrate/20100928030611_create_contact_opportunities.rb +2 -0
- data/db/migrate/20100928030612_create_tasks.rb +2 -0
- data/db/migrate/20100928030613_create_comments.rb +4 -2
- data/db/migrate/20100928030614_create_activities.rb +7 -5
- data/db/migrate/20100928030615_create_avatars.rb +5 -3
- data/db/migrate/20100928030616_rename_remember_token.rb +2 -0
- data/db/migrate/20100928030617_drop_openid_tables.rb +3 -1
- data/db/migrate/20100928030618_add_admin_to_users.rb +3 -1
- data/db/migrate/20100928030619_add_suspended_to_users.rb +2 -0
- data/db/migrate/20100928030620_remove_uuid.rb +2 -0
- data/db/migrate/20100928030621_add_email_to_accounts.rb +2 -0
- data/db/migrate/20100928030622_add_background_info_to_models.rb +2 -0
- data/db/migrate/20100928030623_create_addresses.rb +2 -0
- data/db/migrate/20100928030624_add_index_on_permissions.rb +2 -0
- data/db/migrate/20100928030625_create_emails.rb +11 -9
- data/db/migrate/20100928030626_add_state_to_timeline_objects.rb +2 -0
- data/db/migrate/20100928030627_acts_as_taggable_on_migration.rb +2 -0
- data/db/migrate/20101221123456_add_single_access_token_to_users.rb +2 -0
- data/db/migrate/20101221345678_add_rating_and_category_to_accounts.rb +2 -0
- data/db/migrate/20110719082054_add_skype_to_contacts_and_leads.rb +2 -0
- data/db/migrate/20111101083437_create_fields.rb +2 -0
- data/db/migrate/20111101090312_create_field_groups.rb +2 -0
- data/db/migrate/20111116091952_add_field_groups_tag_id.rb +2 -0
- data/db/migrate/20111117041311_change_fields_collection_to_text.rb +2 -0
- data/db/migrate/20111201030535_add_field_groups_klass_name.rb +2 -0
- data/db/migrate/20120121054235_create_lists.rb +2 -0
- data/db/migrate/20120216031616_create_versions.rb +4 -2
- data/db/migrate/20120216042541_is_paranoid_to_paper_trail.rb +2 -0
- data/db/migrate/20120220233724_add_versions_object_changes.rb +2 -0
- data/db/migrate/20120224073107_remove_default_value_and_clear_settings.rb +2 -0
- data/db/migrate/20120309070209_add_versions_related.rb +2 -0
- data/db/migrate/20120314080441_add_subscribed_users_to_entities.rb +2 -0
- data/db/migrate/20120316045804_activities_to_versions.rb +13 -12
- data/db/migrate/20120405080727_change_subscribed_users_to_set.rb +2 -0
- data/db/migrate/20120405080742_change_further_subscribed_users_to_set.rb +2 -0
- data/db/migrate/20120406082136_create_groups.rb +2 -0
- data/db/migrate/20120413034923_add_index_on_versions_item_type.rb +2 -0
- data/db/migrate/20120510025219_add_not_null_constraints_for_timestamp_columns.rb +5 -4
- data/db/migrate/20120528102124_increase_length_of_version_events.rb +2 -0
- data/db/migrate/20120801032706_add_pair_id_to_fields.rb +2 -0
- data/db/migrate/20121003063155_add_settings_to_custom_fields.rb +2 -0
- data/db/migrate/20121221033947_fix_country_mapping.rb +2 -0
- data/db/migrate/20131207033244_add_user_id_to_lists.rb +2 -0
- data/db/migrate/20140916011927_add_created_at_index_on_versions.rb +2 -0
- data/db/migrate/20140916012922_add_indexes_to_model_associations.rb +2 -0
- data/db/migrate/20141126031837_increase_email_to254_chars.rb +2 -0
- data/db/migrate/20141230021159_add_transaction_id_column_to_versions.rb +2 -0
- data/db/migrate/20141230205453_add_missing_unique_indices.acts_as_taggable_on_engine.rb +2 -0
- data/db/migrate/20141230205454_add_taggings_counter_cache_to_tags.acts_as_taggable_on_engine.rb +2 -0
- data/db/migrate/20141230205455_add_missing_taggable_index.acts_as_taggable_on_engine.rb +2 -0
- data/db/migrate/20150123060900_convert_radio_to_radio_buttons.rb +2 -0
- data/db/migrate/20150227123054_remove_last_request_at_from_users.rb +2 -0
- data/db/migrate/20150427131956_create_index_related_type.rb +2 -0
- data/db/migrate/20160511053730_add_account_contacts_index.rb +2 -0
- data/db/migrate/20180102075234_add_account_counter_caches.rb +24 -0
- data/db/migrate/20180103223438_add_minlength_to_field.rb +7 -0
- data/db/schema.rb +300 -316
- data/db/seeds.rb +1 -0
- data/db/seeds/fields.rb +2 -0
- data/fat_free_crm.gemspec +4 -4
- data/lib/development_tasks/gem.rake +2 -0
- data/lib/development_tasks/license.rake +2 -0
- data/lib/development_tasks/rdoc.rake +2 -0
- data/lib/development_tasks/rspec.rake +2 -0
- data/lib/fat_free_crm.rb +2 -0
- data/lib/fat_free_crm/callback.rb +2 -0
- data/lib/fat_free_crm/comment_extensions.rb +2 -0
- data/lib/fat_free_crm/core_ext.rb +2 -0
- data/lib/fat_free_crm/core_ext/alias_method_chain.rb +7 -6
- data/lib/fat_free_crm/core_ext/nil.rb +2 -0
- data/lib/fat_free_crm/core_ext/string.rb +4 -2
- data/lib/fat_free_crm/custom_fields.rb +2 -0
- data/lib/fat_free_crm/engine.rb +2 -0
- data/lib/fat_free_crm/errors.rb +2 -0
- data/lib/fat_free_crm/exceptions.rb +2 -0
- data/lib/fat_free_crm/export_csv.rb +3 -1
- data/lib/fat_free_crm/exportable.rb +2 -0
- data/lib/fat_free_crm/fields.rb +2 -0
- data/lib/fat_free_crm/gem_dependencies.rb +2 -0
- data/lib/fat_free_crm/gem_ext.rb +2 -0
- data/lib/fat_free_crm/gem_ext/action_controller/base.rb +2 -0
- data/lib/fat_free_crm/gem_ext/active_support/buffered_logger.rb +4 -2
- data/lib/fat_free_crm/gem_ext/rails/engine.rb +9 -8
- data/lib/fat_free_crm/gem_ext/rake/task.rb +2 -0
- data/lib/fat_free_crm/gem_ext/simple_form/action_view_extensions/form_helper.rb +2 -0
- data/lib/fat_free_crm/i18n.rb +2 -0
- data/lib/fat_free_crm/load_settings.rb +2 -0
- data/lib/fat_free_crm/mail_processor/base.rb +11 -8
- data/lib/fat_free_crm/mail_processor/comment_replies.rb +2 -0
- data/lib/fat_free_crm/mail_processor/dropbox.rb +5 -3
- data/lib/fat_free_crm/permissions.rb +8 -9
- data/lib/fat_free_crm/renderers.rb +2 -0
- data/lib/fat_free_crm/secret_token_generator.rb +2 -0
- data/lib/fat_free_crm/sortable.rb +2 -0
- data/lib/fat_free_crm/tabs.rb +2 -0
- data/lib/fat_free_crm/version.rb +4 -2
- data/lib/fat_free_crm/view_factory.rb +3 -1
- data/lib/gravatar_image_tag.rb +2 -0
- data/lib/missing_translation_detector.rb +2 -0
- data/lib/tasks/ffcrm/comment_replies.rake +2 -0
- data/lib/tasks/ffcrm/config.rake +2 -0
- data/lib/tasks/ffcrm/demo.rake +3 -1
- data/lib/tasks/ffcrm/dropbox.rake +2 -0
- data/lib/tasks/ffcrm/missing_translations.rake +8 -7
- data/lib/tasks/ffcrm/secret.rake +2 -0
- data/lib/tasks/ffcrm/settings.rake +2 -0
- data/lib/tasks/ffcrm/setup.rake +2 -0
- data/lib/tasks/ffcrm/update_data.rake +98 -96
- data/script/rails +4 -2
- data/spec/controllers/admin/groups_controller_spec.rb +2 -0
- data/spec/controllers/admin/users_controller_spec.rb +3 -1
- data/spec/controllers/applications_controller_spec.rb +2 -0
- data/spec/controllers/authentications_controller_spec.rb +2 -0
- data/spec/controllers/comments_controller_spec.rb +3 -1
- data/spec/controllers/emails_controller_spec.rb +3 -1
- data/spec/controllers/entities/accounts_controller_spec.rb +4 -2
- data/spec/controllers/entities/campaigns_controller_spec.rb +4 -2
- data/spec/controllers/entities/contacts_controller_spec.rb +4 -2
- data/spec/controllers/entities/leads_controller_spec.rb +4 -2
- data/spec/controllers/entities/opportunities_controller_spec.rb +4 -2
- data/spec/controllers/entities_controller_spec.rb +2 -0
- data/spec/controllers/home_controller_spec.rb +14 -10
- data/spec/controllers/lists_controller_spec.rb +2 -0
- data/spec/controllers/passwords_controller_spec.rb +2 -0
- data/spec/controllers/tasks_controller_spec.rb +3 -1
- data/spec/controllers/users_controller_spec.rb +20 -18
- data/spec/factories/account_factories.rb +2 -0
- data/spec/factories/campaign_factories.rb +2 -0
- data/spec/factories/contact_factories.rb +2 -0
- data/spec/factories/field_factories.rb +2 -0
- data/spec/factories/lead_factories.rb +2 -0
- data/spec/factories/list_factories.rb +2 -0
- data/spec/factories/opportunity_factories.rb +2 -0
- data/spec/factories/sequences.rb +4 -2
- data/spec/factories/setting_factories.rb +2 -0
- data/spec/factories/shared_factories.rb +3 -1
- data/spec/factories/subscription_factories.rb +2 -0
- data/spec/factories/tag_factories.rb +2 -0
- data/spec/factories/task_factories.rb +2 -0
- data/spec/factories/user_factories.rb +3 -1
- data/spec/features/acceptance_helper.rb +2 -0
- data/spec/features/accounts_spec.rb +5 -1
- data/spec/features/admin/groups_spec.rb +4 -3
- data/spec/features/admin/users_spec.rb +4 -3
- data/spec/features/campaigns_spec.rb +2 -1
- data/spec/features/contacts_spec.rb +3 -1
- data/spec/features/dashboard_spec.rb +2 -1
- data/spec/features/leads_spec.rb +7 -2
- data/spec/features/opportunities_overview_spec.rb +2 -1
- data/spec/features/opportunities_spec.rb +3 -2
- data/spec/features/support/browser.rb +2 -0
- data/spec/features/support/headless.rb +2 -0
- data/spec/features/support/helpers.rb +2 -0
- data/spec/features/support/maintain_sessions.rb +2 -0
- data/spec/features/support/paths.rb +2 -0
- data/spec/features/support/selector_helpers.rb +2 -6
- data/spec/features/tasks_spec.rb +8 -7
- data/spec/helpers/accounts_helper_spec.rb +2 -0
- data/spec/helpers/admin/field_groups_helper_spec.rb +2 -0
- data/spec/helpers/admin/plugins_helper_spec.rb +2 -0
- data/spec/helpers/admin/settings_helper_spec.rb +2 -0
- data/spec/helpers/admin/users_helper_spec.rb +2 -0
- data/spec/helpers/application_helper_spec.rb +6 -3
- data/spec/helpers/authentications_helper_spec.rb +2 -0
- data/spec/helpers/campaigns_helper_spec.rb +2 -0
- data/spec/helpers/comments_helper_spec.rb +2 -0
- data/spec/helpers/contacts_helper_spec.rb +2 -0
- data/spec/helpers/emails_helper_spec.rb +2 -0
- data/spec/helpers/fields_helper_spec.rb +2 -0
- data/spec/helpers/groups_helper_spec.rb +2 -0
- data/spec/helpers/home_helper_spec.rb +2 -0
- data/spec/helpers/leads_helper_spec.rb +2 -0
- data/spec/helpers/lists_helper_spec.rb +2 -0
- data/spec/helpers/opportunities_helper_spec.rb +2 -0
- data/spec/helpers/passwords_helper_spec.rb +2 -0
- data/spec/helpers/tasks_helper_spec.rb +2 -0
- data/spec/helpers/users_helper_spec.rb +2 -0
- data/spec/lib/comment_extensions_spec.rb +2 -0
- data/spec/lib/core_ext/string_spec.rb +2 -0
- data/spec/lib/errors_spec.rb +2 -0
- data/spec/lib/fields_spec.rb +2 -0
- data/spec/lib/mail_processor/base_spec.rb +2 -0
- data/spec/lib/mail_processor/comment_replies_spec.rb +2 -0
- data/spec/lib/mail_processor/dropbox_spec.rb +2 -0
- data/spec/lib/mail_processor/sample_emails/dropbox.rb +166 -164
- data/spec/lib/permissions_spec.rb +2 -0
- data/spec/lib/secret_token_generator_spec.rb +2 -0
- data/spec/lib/view_factory_spec.rb +2 -0
- data/spec/mailers/subscription_mailer_spec.rb +15 -16
- data/spec/mailers/user_mailer_spec.rb +2 -0
- data/spec/models/entities/account_contact_spec.rb +3 -0
- data/spec/models/entities/account_opportunity_spec.rb +3 -0
- data/spec/models/entities/account_spec.rb +3 -1
- data/spec/models/entities/campaign_spec.rb +3 -1
- data/spec/models/entities/contact_opportunity_spec.rb +2 -0
- data/spec/models/entities/contact_spec.rb +35 -21
- data/spec/models/entities/lead_spec.rb +3 -1
- data/spec/models/entities/opportunity_spec.rb +39 -27
- data/spec/models/fields/custom_field_date_pair_spec.rb +2 -0
- data/spec/models/fields/custom_field_pair_spec.rb +2 -0
- data/spec/models/fields/custom_field_spec.rb +2 -0
- data/spec/models/fields/field_group_spec.rb +2 -0
- data/spec/models/fields/field_spec.rb +8 -4
- data/spec/models/list_spec.rb +2 -0
- data/spec/models/observers/entity_observer_spec.rb +2 -0
- data/spec/models/polymorphic/address_spec.rb +2 -4
- data/spec/models/polymorphic/avatar_spec.rb +2 -0
- data/spec/models/polymorphic/comment_spec.rb +2 -4
- data/spec/models/polymorphic/email_spec.rb +2 -0
- data/spec/models/polymorphic/task_spec.rb +6 -4
- data/spec/models/polymorphic/version_spec.rb +7 -10
- data/spec/models/setting_spec.rb +23 -0
- data/spec/models/users/abilities/user_ability_spec.rb +2 -0
- data/spec/models/users/authentication_spec.rb +2 -0
- data/spec/models/users/group_spec.rb +2 -0
- data/spec/models/users/permission_spec.rb +2 -0
- data/spec/models/users/preference_spec.rb +2 -0
- data/spec/models/users/user_spec.rb +11 -17
- data/spec/routing/accounts_routing_spec.rb +2 -0
- data/spec/routing/admin/users_routing_spec.rb +2 -0
- data/spec/routing/campaigns_routing_spec.rb +2 -0
- data/spec/routing/comments_routing_spec.rb +2 -0
- data/spec/routing/contacts_routing_spec.rb +2 -0
- data/spec/routing/emails_routing_spec.rb +2 -0
- data/spec/routing/leads_routing_spec.rb +2 -0
- data/spec/routing/opportunities_routing_spec.rb +2 -0
- data/spec/routing/tasks_routing_spec.rb +2 -0
- data/spec/routing/users_routing_spec.rb +2 -0
- data/spec/shared/controllers.rb +2 -0
- data/spec/shared/models.rb +2 -0
- data/spec/spec_helper.rb +7 -5
- data/spec/support/assert_select.rb +2 -0
- data/spec/support/auth_macros.rb +5 -12
- data/spec/support/macros.rb +9 -7
- data/spec/support/mail_processor_mocks.rb +2 -0
- data/spec/support/uploaded_file.rb +2 -0
- data/spec/views/accounts/_edit.haml_spec.rb +4 -3
- data/spec/views/accounts/_new.haml_spec.rb +3 -1
- data/spec/views/accounts/create.js.haml_spec.rb +3 -1
- data/spec/views/accounts/destroy.js.haml_spec.rb +3 -1
- data/spec/views/accounts/edit.js.haml_spec.rb +3 -1
- data/spec/views/accounts/index.haml_spec.rb +3 -1
- data/spec/views/accounts/index.js.haml_spec.rb +3 -1
- data/spec/views/accounts/new.js.haml_spec.rb +3 -1
- data/spec/views/accounts/show.haml_spec.rb +6 -1
- data/spec/views/accounts/update.js.haml_spec.rb +3 -1
- data/spec/views/admin/field_groups/create.js.haml_spec.rb +3 -1
- data/spec/views/admin/field_groups/destroy.js.haml_spec.rb +3 -1
- data/spec/views/admin/field_groups/edit.js.haml_spec.rb +3 -1
- data/spec/views/admin/field_groups/new.js.haml_spec.rb +3 -1
- data/spec/views/admin/field_groups/update.js.haml_spec.rb +3 -1
- data/spec/views/admin/users/_create.haml_spec.rb +3 -1
- data/spec/views/admin/users/create.js.haml_spec.rb +3 -1
- data/spec/views/admin/users/destroy.js.haml_spec.rb +3 -1
- data/spec/views/admin/users/edit.js.haml_spec.rb +3 -1
- data/spec/views/admin/users/index.haml_spec.rb +3 -1
- data/spec/views/admin/users/index.js.haml_spec.rb +3 -1
- data/spec/views/admin/users/new.js.haml_spec.rb +3 -1
- data/spec/views/admin/users/reactivate.js.haml_spec.rb +3 -1
- data/spec/views/admin/users/show.haml_spec.rb +2 -0
- data/spec/views/admin/users/suspend.js.haml_spec.rb +3 -1
- data/spec/views/admin/users/update.js.haml_spec.rb +3 -1
- data/spec/views/application/auto_complete.haml_spec.rb +3 -1
- data/spec/views/authentications/new.haml_spec.rb +2 -0
- data/spec/views/campaigns/_edit.haml_spec.rb +3 -1
- data/spec/views/campaigns/_new.haml_spec.rb +3 -1
- data/spec/views/campaigns/create.js.haml_spec.rb +3 -1
- data/spec/views/campaigns/destroy.js.haml_spec.rb +3 -1
- data/spec/views/campaigns/edit.js.haml_spec.rb +3 -1
- data/spec/views/campaigns/index.haml_spec.rb +3 -1
- data/spec/views/campaigns/index.js.haml_spec.rb +3 -1
- data/spec/views/campaigns/new.js.haml_spec.rb +3 -1
- data/spec/views/campaigns/show.haml_spec.rb +6 -1
- data/spec/views/campaigns/update.js.haml_spec.rb +3 -1
- data/spec/views/comments/edit.js.haml_spec.rb +5 -4
- data/spec/views/contacts/_edit.haml_spec.rb +3 -1
- data/spec/views/contacts/_new.haml_spec.rb +3 -1
- data/spec/views/contacts/create.js.haml_spec.rb +3 -1
- data/spec/views/contacts/destroy.js.haml_spec.rb +3 -1
- data/spec/views/contacts/edit.js.haml_spec.rb +3 -1
- data/spec/views/contacts/index.haml_spec.rb +3 -1
- data/spec/views/contacts/index.js.html_spec.rb +3 -1
- data/spec/views/contacts/new.js.haml_spec.rb +3 -1
- data/spec/views/contacts/show.haml_spec.rb +6 -1
- data/spec/views/contacts/update.js.haml_spec.rb +3 -1
- data/spec/views/home/index.haml_spec.rb +3 -1
- data/spec/views/home/index.js.haml_spec.rb +3 -1
- data/spec/views/home/options.js.haml_spec.rb +4 -2
- data/spec/views/leads/_convert.haml_spec.rb +3 -1
- data/spec/views/leads/_edit.haml_spec.rb +3 -1
- data/spec/views/leads/_new.haml_spec.rb +3 -1
- data/spec/views/leads/_sidebar_show.haml_spec.rb +3 -1
- data/spec/views/leads/convert.js.haml_spec.rb +3 -1
- data/spec/views/leads/create.js.haml_spec.rb +3 -1
- data/spec/views/leads/destroy.js.haml_spec.rb +3 -1
- data/spec/views/leads/edit.js.haml_spec.rb +3 -1
- data/spec/views/leads/index.haml_spec.rb +3 -1
- data/spec/views/leads/index.js.haml_spec.rb +3 -1
- data/spec/views/leads/new.js.haml_spec.rb +3 -1
- data/spec/views/leads/promote.js.haml_spec.rb +3 -1
- data/spec/views/leads/reject.js.haml_spec.rb +3 -1
- data/spec/views/leads/show.haml_spec.rb +6 -1
- data/spec/views/leads/update.js.haml_spec.rb +3 -1
- data/spec/views/opportunities/_edit.haml_spec.rb +3 -1
- data/spec/views/opportunities/_new.haml_spec.rb +3 -1
- data/spec/views/opportunities/create.js.haml_spec.rb +3 -1
- data/spec/views/opportunities/destroy.js.haml_spec.rb +3 -1
- data/spec/views/opportunities/edit.js.haml_spec.rb +3 -1
- data/spec/views/opportunities/index.haml_spec.rb +3 -1
- data/spec/views/opportunities/index.js.haml_spec.rb +3 -1
- data/spec/views/opportunities/new.js.haml_spec.rb +3 -1
- data/spec/views/opportunities/show.haml_spec.rb +6 -1
- data/spec/views/opportunities/update.js.haml_spec.rb +3 -1
- data/spec/views/tasks/_edit.haml_spec.rb +3 -1
- data/spec/views/tasks/complete.js.haml_spec.rb +3 -1
- data/spec/views/tasks/create.js.haml_spec.rb +3 -1
- data/spec/views/tasks/destroy.js.haml_spec.rb +3 -1
- data/spec/views/tasks/edit.js.haml_spec.rb +3 -1
- data/spec/views/tasks/index.haml_spec.rb +6 -4
- data/spec/views/tasks/new.js.haml_spec.rb +3 -1
- data/spec/views/tasks/uncomplete.js.haml_spec.rb +3 -1
- data/spec/views/tasks/update.js.haml_spec.rb +3 -1
- data/spec/views/users/avatar.js.haml_spec.rb +3 -1
- data/spec/views/users/change_password.js.haml_spec.rb +3 -1
- data/spec/views/users/edit.js.haml_spec.rb +3 -1
- data/spec/views/users/password.js.haml_spec.rb +3 -1
- data/spec/views/users/update.js.haml_spec.rb +3 -1
- data/spec/views/users/upload_avatar.js.haml_spec.rb +4 -2
- data/vendor/assets/javascripts/textarea_autocomplete.js +1 -1
- data/vendor/gems/globby-0.1.2/lib/globby/glob.rb +1 -1
- metadata +8 -12
- data/app/assets/javascripts/crm_chosen.js.coffee +0 -29
- data/app/assets/stylesheets/ffcrm_chosen.scss +0 -69
- data/vendor/assets/javascripts/ajax-chosen-jquery.js +0 -2
- data/vendor/assets/javascripts/ajax-chosen.jquery.coffee +0 -171
- data/vendor/assets/javascripts/chosen-jquery.js +0 -3
- data/vendor/assets/javascripts/chosen.jquery.coffee +0 -574
- data/vendor/assets/javascripts/lib/abstract-chosen.coffee +0 -110
- data/vendor/assets/stylesheets/chosen.css.sass +0 -361
@@ -1,9 +1,11 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
class CreateVersions < ActiveRecord::Migration[4.2]
|
2
4
|
def self.up
|
3
5
|
create_table :versions do |t|
|
4
6
|
t.string :item_type, null: false
|
5
|
-
t.integer :item_id,
|
6
|
-
t.string :event,
|
7
|
+
t.integer :item_id, null: false
|
8
|
+
t.string :event, null: false
|
7
9
|
t.string :whodunnit
|
8
10
|
t.text :object
|
9
11
|
t.datetime :created_at
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
class ActivitiesToVersions < ActiveRecord::Migration[4.2]
|
2
4
|
def up
|
3
5
|
events = {
|
@@ -15,18 +17,17 @@ class ActivitiesToVersions < ActiveRecord::Migration[4.2]
|
|
15
17
|
activities = connection.select_all 'SELECT * FROM activities'
|
16
18
|
activities.each do |activity|
|
17
19
|
# commented and email activities don't translate well so ignore them
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
end
|
20
|
+
next unless event = events[activity['action']]
|
21
|
+
attributes = {
|
22
|
+
item_id: activity['subject_id'],
|
23
|
+
item_type: activity['subject_type'],
|
24
|
+
whodunnit: activity['user_id'],
|
25
|
+
event: event,
|
26
|
+
created_at: activity['created_at']
|
27
|
+
}
|
28
|
+
version = Version.new
|
29
|
+
attributes.each { |k, v| version.send("#{k}=", v) }
|
30
|
+
version.save!
|
30
31
|
end
|
31
32
|
end
|
32
33
|
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
class AddNotNullConstraintsForTimestampColumns < ActiveRecord::Migration[4.2]
|
2
4
|
def up
|
3
5
|
set_timestamp_constraints null: false unless $FFCRM_NEW_DATABASE
|
@@ -12,10 +14,9 @@ class AddNotNullConstraintsForTimestampColumns < ActiveRecord::Migration[4.2]
|
|
12
14
|
def set_timestamp_constraints(constraints)
|
13
15
|
ActiveRecord::Base.connection.tables.each do |table|
|
14
16
|
# If table has both timestamp columns, set not null constraints on both columns.
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
end
|
17
|
+
next unless %i[created_at updated_at].all? { |column| column_exists?(table, column) }
|
18
|
+
%i[created_at updated_at].each do |column|
|
19
|
+
change_column table, column, :datetime, constraints
|
19
20
|
end
|
20
21
|
end
|
21
22
|
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class AddAccountCounterCaches < ActiveRecord::Migration[5.1]
|
4
|
+
def change
|
5
|
+
change_table :accounts do |t|
|
6
|
+
t.integer :contacts_count, default: 0
|
7
|
+
t.integer :opportunities_count, default: 0
|
8
|
+
end
|
9
|
+
|
10
|
+
reversible do |dir|
|
11
|
+
dir.up { data }
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
def data
|
16
|
+
Account.all.each do |account|
|
17
|
+
Account.update_counters(
|
18
|
+
account.id,
|
19
|
+
contacts_count: account.contacts.count,
|
20
|
+
opportunities_count: account.opportunities.count
|
21
|
+
)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
data/db/schema.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# This file is auto-generated from the current state of the database. Instead
|
4
4
|
# of editing this file, please use the migrations feature of Active Record to
|
@@ -12,234 +12,229 @@
|
|
12
12
|
#
|
13
13
|
# It's strongly recommended that you check this file into your version control system.
|
14
14
|
|
15
|
-
ActiveRecord::Schema.define(version:
|
15
|
+
ActiveRecord::Schema.define(version: 20180103223438) do
|
16
|
+
|
16
17
|
# These are extensions that must be enabled in order to support this database
|
17
18
|
enable_extension "plpgsql"
|
18
19
|
|
19
|
-
create_table "account_contacts", force: :cascade do |t|
|
20
|
-
t.integer
|
21
|
-
t.integer
|
20
|
+
create_table "account_contacts", id: :serial, force: :cascade do |t|
|
21
|
+
t.integer "account_id"
|
22
|
+
t.integer "contact_id"
|
22
23
|
t.datetime "deleted_at"
|
23
24
|
t.datetime "created_at"
|
24
25
|
t.datetime "updated_at"
|
26
|
+
t.index ["account_id", "contact_id"], name: "index_account_contacts_on_account_id_and_contact_id"
|
25
27
|
end
|
26
28
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
t.integer "account_id"
|
31
|
-
t.integer "opportunity_id"
|
29
|
+
create_table "account_opportunities", id: :serial, force: :cascade do |t|
|
30
|
+
t.integer "account_id"
|
31
|
+
t.integer "opportunity_id"
|
32
32
|
t.datetime "deleted_at"
|
33
33
|
t.datetime "created_at"
|
34
34
|
t.datetime "updated_at"
|
35
|
+
t.index ["account_id", "opportunity_id"], name: "index_account_opportunities_on_account_id_and_opportunity_id"
|
35
36
|
end
|
36
37
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
t.
|
41
|
-
t.
|
42
|
-
t.string
|
43
|
-
t.string
|
44
|
-
t.string
|
45
|
-
t.string
|
46
|
-
t.string "phone", limit: 32
|
47
|
-
t.string "fax", limit: 32
|
38
|
+
create_table "accounts", id: :serial, force: :cascade do |t|
|
39
|
+
t.integer "user_id"
|
40
|
+
t.integer "assigned_to"
|
41
|
+
t.string "name", limit: 64, default: "", null: false
|
42
|
+
t.string "access", limit: 8, default: "Public"
|
43
|
+
t.string "website", limit: 64
|
44
|
+
t.string "toll_free_phone", limit: 32
|
45
|
+
t.string "phone", limit: 32
|
46
|
+
t.string "fax", limit: 32
|
48
47
|
t.datetime "deleted_at"
|
49
48
|
t.datetime "created_at"
|
50
49
|
t.datetime "updated_at"
|
51
|
-
t.string
|
52
|
-
t.string
|
53
|
-
t.integer
|
54
|
-
t.string
|
55
|
-
t.text
|
50
|
+
t.string "email", limit: 254
|
51
|
+
t.string "background_info"
|
52
|
+
t.integer "rating", default: 0, null: false
|
53
|
+
t.string "category", limit: 32
|
54
|
+
t.text "subscribed_users"
|
55
|
+
t.integer "contacts_count", default: 0
|
56
|
+
t.integer "opportunities_count", default: 0
|
57
|
+
t.integer "pipeline_opportunities_count", default: 0
|
58
|
+
t.index ["assigned_to"], name: "index_accounts_on_assigned_to"
|
59
|
+
t.index ["user_id", "name", "deleted_at"], name: "index_accounts_on_user_id_and_name_and_deleted_at", unique: true
|
56
60
|
end
|
57
61
|
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
t.
|
63
|
-
t.
|
64
|
-
t.
|
65
|
-
t.string "action", limit: 32, default: "created"
|
66
|
-
t.string "info", default: ""
|
67
|
-
t.boolean "private", default: false
|
62
|
+
create_table "activities", id: :serial, force: :cascade do |t|
|
63
|
+
t.integer "user_id"
|
64
|
+
t.string "subject_type"
|
65
|
+
t.integer "subject_id"
|
66
|
+
t.string "action", limit: 32, default: "created"
|
67
|
+
t.string "info", default: ""
|
68
|
+
t.boolean "private", default: false
|
68
69
|
t.datetime "created_at"
|
69
70
|
t.datetime "updated_at"
|
71
|
+
t.index ["created_at"], name: "index_activities_on_created_at"
|
72
|
+
t.index ["user_id"], name: "index_activities_on_user_id"
|
70
73
|
end
|
71
74
|
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
t.string
|
77
|
-
t.string
|
78
|
-
t.string
|
79
|
-
t.string
|
80
|
-
t.string
|
81
|
-
t.string
|
82
|
-
t.
|
83
|
-
t.string "address_type", limit: 16
|
84
|
-
t.integer "addressable_id"
|
85
|
-
t.string "addressable_type"
|
75
|
+
create_table "addresses", id: :serial, force: :cascade do |t|
|
76
|
+
t.string "street1"
|
77
|
+
t.string "street2"
|
78
|
+
t.string "city", limit: 64
|
79
|
+
t.string "state", limit: 64
|
80
|
+
t.string "zipcode", limit: 16
|
81
|
+
t.string "country", limit: 64
|
82
|
+
t.string "full_address"
|
83
|
+
t.string "address_type", limit: 16
|
84
|
+
t.string "addressable_type"
|
85
|
+
t.integer "addressable_id"
|
86
86
|
t.datetime "created_at"
|
87
87
|
t.datetime "updated_at"
|
88
88
|
t.datetime "deleted_at"
|
89
|
+
t.index ["addressable_id", "addressable_type"], name: "index_addresses_on_addressable_id_and_addressable_type"
|
89
90
|
end
|
90
91
|
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
t.integer
|
95
|
-
t.integer
|
96
|
-
t.string
|
97
|
-
t.
|
98
|
-
t.string "image_file_name"
|
99
|
-
t.string "image_content_type"
|
92
|
+
create_table "avatars", id: :serial, force: :cascade do |t|
|
93
|
+
t.integer "user_id"
|
94
|
+
t.string "entity_type"
|
95
|
+
t.integer "entity_id"
|
96
|
+
t.integer "image_file_size"
|
97
|
+
t.string "image_file_name"
|
98
|
+
t.string "image_content_type"
|
100
99
|
t.datetime "created_at"
|
101
100
|
t.datetime "updated_at"
|
102
101
|
end
|
103
102
|
|
104
|
-
create_table "campaigns", force: :cascade do |t|
|
105
|
-
t.integer
|
106
|
-
t.integer
|
107
|
-
t.string
|
108
|
-
t.string
|
109
|
-
t.string
|
110
|
-
t.decimal
|
111
|
-
t.integer
|
112
|
-
t.float
|
113
|
-
t.decimal
|
114
|
-
t.integer
|
115
|
-
t.integer
|
116
|
-
t.decimal
|
117
|
-
t.date
|
118
|
-
t.date
|
119
|
-
t.text
|
103
|
+
create_table "campaigns", id: :serial, force: :cascade do |t|
|
104
|
+
t.integer "user_id"
|
105
|
+
t.integer "assigned_to"
|
106
|
+
t.string "name", limit: 64, default: "", null: false
|
107
|
+
t.string "access", limit: 8, default: "Public"
|
108
|
+
t.string "status", limit: 64
|
109
|
+
t.decimal "budget", precision: 12, scale: 2
|
110
|
+
t.integer "target_leads"
|
111
|
+
t.float "target_conversion"
|
112
|
+
t.decimal "target_revenue", precision: 12, scale: 2
|
113
|
+
t.integer "leads_count"
|
114
|
+
t.integer "opportunities_count"
|
115
|
+
t.decimal "revenue", precision: 12, scale: 2
|
116
|
+
t.date "starts_on"
|
117
|
+
t.date "ends_on"
|
118
|
+
t.text "objectives"
|
120
119
|
t.datetime "deleted_at"
|
121
120
|
t.datetime "created_at"
|
122
121
|
t.datetime "updated_at"
|
123
|
-
t.string
|
124
|
-
t.text
|
122
|
+
t.string "background_info"
|
123
|
+
t.text "subscribed_users"
|
124
|
+
t.index ["assigned_to"], name: "index_campaigns_on_assigned_to"
|
125
|
+
t.index ["user_id", "name", "deleted_at"], name: "index_campaigns_on_user_id_and_name_and_deleted_at", unique: true
|
125
126
|
end
|
126
127
|
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
t.
|
132
|
-
t.
|
133
|
-
t.
|
134
|
-
t.boolean "private"
|
135
|
-
t.string "title", default: ""
|
136
|
-
t.text "comment"
|
128
|
+
create_table "comments", id: :serial, force: :cascade do |t|
|
129
|
+
t.integer "user_id"
|
130
|
+
t.string "commentable_type"
|
131
|
+
t.integer "commentable_id"
|
132
|
+
t.boolean "private"
|
133
|
+
t.string "title", default: ""
|
134
|
+
t.text "comment"
|
137
135
|
t.datetime "created_at"
|
138
136
|
t.datetime "updated_at"
|
139
|
-
t.string
|
137
|
+
t.string "state", limit: 16, default: "Expanded", null: false
|
140
138
|
end
|
141
139
|
|
142
|
-
create_table "contact_opportunities", force: :cascade do |t|
|
143
|
-
t.integer
|
144
|
-
t.integer
|
145
|
-
t.string
|
140
|
+
create_table "contact_opportunities", id: :serial, force: :cascade do |t|
|
141
|
+
t.integer "contact_id"
|
142
|
+
t.integer "opportunity_id"
|
143
|
+
t.string "role", limit: 32
|
146
144
|
t.datetime "deleted_at"
|
147
145
|
t.datetime "created_at"
|
148
146
|
t.datetime "updated_at"
|
147
|
+
t.index ["contact_id", "opportunity_id"], name: "index_contact_opportunities_on_contact_id_and_opportunity_id"
|
149
148
|
end
|
150
149
|
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
t.integer
|
155
|
-
t.integer
|
156
|
-
t.
|
157
|
-
t.
|
158
|
-
t.string
|
159
|
-
t.string
|
160
|
-
t.string
|
161
|
-
t.string
|
162
|
-
t.string
|
163
|
-
t.string
|
164
|
-
t.string
|
165
|
-
t.string
|
166
|
-
t.string
|
167
|
-
t.string
|
168
|
-
t.string
|
169
|
-
t.string
|
170
|
-
t.string
|
171
|
-
t.
|
172
|
-
t.
|
173
|
-
t.date "born_on"
|
174
|
-
t.boolean "do_not_call", default: false, null: false
|
150
|
+
create_table "contacts", id: :serial, force: :cascade do |t|
|
151
|
+
t.integer "user_id"
|
152
|
+
t.integer "lead_id"
|
153
|
+
t.integer "assigned_to"
|
154
|
+
t.integer "reports_to"
|
155
|
+
t.string "first_name", limit: 64, default: "", null: false
|
156
|
+
t.string "last_name", limit: 64, default: "", null: false
|
157
|
+
t.string "access", limit: 8, default: "Public"
|
158
|
+
t.string "title", limit: 64
|
159
|
+
t.string "department", limit: 64
|
160
|
+
t.string "source", limit: 32
|
161
|
+
t.string "email", limit: 254
|
162
|
+
t.string "alt_email", limit: 254
|
163
|
+
t.string "phone", limit: 32
|
164
|
+
t.string "mobile", limit: 32
|
165
|
+
t.string "fax", limit: 32
|
166
|
+
t.string "blog", limit: 128
|
167
|
+
t.string "linkedin", limit: 128
|
168
|
+
t.string "facebook", limit: 128
|
169
|
+
t.string "twitter", limit: 128
|
170
|
+
t.date "born_on"
|
171
|
+
t.boolean "do_not_call", default: false, null: false
|
175
172
|
t.datetime "deleted_at"
|
176
173
|
t.datetime "created_at"
|
177
174
|
t.datetime "updated_at"
|
178
|
-
t.string
|
179
|
-
t.string
|
180
|
-
t.text
|
175
|
+
t.string "background_info"
|
176
|
+
t.string "skype", limit: 128
|
177
|
+
t.text "subscribed_users"
|
178
|
+
t.index ["assigned_to"], name: "index_contacts_on_assigned_to"
|
179
|
+
t.index ["user_id", "last_name", "deleted_at"], name: "id_last_name_deleted", unique: true
|
181
180
|
end
|
182
181
|
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
t.
|
188
|
-
t.
|
189
|
-
t.
|
190
|
-
t.string
|
191
|
-
t.string
|
192
|
-
t.string
|
193
|
-
t.
|
194
|
-
t.
|
195
|
-
t.string "subject"
|
196
|
-
t.text "body"
|
197
|
-
t.text "header"
|
182
|
+
create_table "emails", id: :serial, force: :cascade do |t|
|
183
|
+
t.string "imap_message_id", null: false
|
184
|
+
t.integer "user_id"
|
185
|
+
t.string "mediator_type"
|
186
|
+
t.integer "mediator_id"
|
187
|
+
t.string "sent_from", null: false
|
188
|
+
t.string "sent_to", null: false
|
189
|
+
t.string "cc"
|
190
|
+
t.string "bcc"
|
191
|
+
t.string "subject"
|
192
|
+
t.text "body"
|
193
|
+
t.text "header"
|
198
194
|
t.datetime "sent_at"
|
199
195
|
t.datetime "received_at"
|
200
196
|
t.datetime "deleted_at"
|
201
197
|
t.datetime "created_at"
|
202
198
|
t.datetime "updated_at"
|
203
|
-
t.string
|
199
|
+
t.string "state", limit: 16, default: "Expanded", null: false
|
200
|
+
t.index ["mediator_id", "mediator_type"], name: "index_emails_on_mediator_id_and_mediator_type"
|
204
201
|
end
|
205
202
|
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
t.
|
210
|
-
t.string
|
211
|
-
t.integer "position"
|
212
|
-
t.string "hint"
|
203
|
+
create_table "field_groups", id: :serial, force: :cascade do |t|
|
204
|
+
t.string "name", limit: 64
|
205
|
+
t.string "label", limit: 128
|
206
|
+
t.integer "position"
|
207
|
+
t.string "hint"
|
213
208
|
t.datetime "created_at"
|
214
209
|
t.datetime "updated_at"
|
215
|
-
t.integer
|
216
|
-
t.string
|
210
|
+
t.integer "tag_id"
|
211
|
+
t.string "klass_name", limit: 32
|
217
212
|
end
|
218
213
|
|
219
|
-
create_table "fields", force: :cascade do |t|
|
220
|
-
t.string
|
221
|
-
t.integer
|
222
|
-
t.integer
|
223
|
-
t.string
|
224
|
-
t.string
|
225
|
-
t.string
|
226
|
-
t.string
|
227
|
-
t.string
|
228
|
-
t.text
|
229
|
-
t.boolean
|
230
|
-
t.boolean
|
231
|
-
t.integer
|
214
|
+
create_table "fields", id: :serial, force: :cascade do |t|
|
215
|
+
t.string "type"
|
216
|
+
t.integer "field_group_id"
|
217
|
+
t.integer "position"
|
218
|
+
t.string "name", limit: 64
|
219
|
+
t.string "label", limit: 128
|
220
|
+
t.string "hint"
|
221
|
+
t.string "placeholder"
|
222
|
+
t.string "as", limit: 32
|
223
|
+
t.text "collection"
|
224
|
+
t.boolean "disabled"
|
225
|
+
t.boolean "required"
|
226
|
+
t.integer "maxlength"
|
232
227
|
t.datetime "created_at"
|
233
228
|
t.datetime "updated_at"
|
234
|
-
t.integer
|
235
|
-
t.text
|
229
|
+
t.integer "pair_id"
|
230
|
+
t.text "settings"
|
231
|
+
t.integer "minlength", default: 0
|
232
|
+
t.index ["field_group_id"], name: "index_fields_on_field_group_id"
|
233
|
+
t.index ["name"], name: "index_fields_on_name"
|
236
234
|
end
|
237
235
|
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
create_table "groups", force: :cascade do |t|
|
242
|
-
t.string "name"
|
236
|
+
create_table "groups", id: :serial, force: :cascade do |t|
|
237
|
+
t.string "name"
|
243
238
|
t.datetime "created_at"
|
244
239
|
t.datetime "updated_at"
|
245
240
|
end
|
@@ -247,212 +242,201 @@ ActiveRecord::Schema.define(version: 20160511053730) do
|
|
247
242
|
create_table "groups_users", id: false, force: :cascade do |t|
|
248
243
|
t.integer "group_id"
|
249
244
|
t.integer "user_id"
|
245
|
+
t.index ["group_id", "user_id"], name: "index_groups_users_on_group_id_and_user_id"
|
246
|
+
t.index ["group_id"], name: "index_groups_users_on_group_id"
|
247
|
+
t.index ["user_id"], name: "index_groups_users_on_user_id"
|
250
248
|
end
|
251
249
|
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
t.
|
258
|
-
t.
|
259
|
-
t.
|
260
|
-
t.string
|
261
|
-
t.string
|
262
|
-
t.string
|
263
|
-
t.string
|
264
|
-
t.string
|
265
|
-
t.string
|
266
|
-
t.string
|
267
|
-
t.string
|
268
|
-
t.string
|
269
|
-
t.string
|
270
|
-
t.string
|
271
|
-
t.string
|
272
|
-
t.
|
273
|
-
t.
|
274
|
-
t.string "facebook", limit: 128
|
275
|
-
t.string "twitter", limit: 128
|
276
|
-
t.integer "rating", default: 0, null: false
|
277
|
-
t.boolean "do_not_call", default: false, null: false
|
250
|
+
create_table "leads", id: :serial, force: :cascade do |t|
|
251
|
+
t.integer "user_id"
|
252
|
+
t.integer "campaign_id"
|
253
|
+
t.integer "assigned_to"
|
254
|
+
t.string "first_name", limit: 64, default: "", null: false
|
255
|
+
t.string "last_name", limit: 64, default: "", null: false
|
256
|
+
t.string "access", limit: 8, default: "Public"
|
257
|
+
t.string "title", limit: 64
|
258
|
+
t.string "company", limit: 64
|
259
|
+
t.string "source", limit: 32
|
260
|
+
t.string "status", limit: 32
|
261
|
+
t.string "referred_by", limit: 64
|
262
|
+
t.string "email", limit: 254
|
263
|
+
t.string "alt_email", limit: 254
|
264
|
+
t.string "phone", limit: 32
|
265
|
+
t.string "mobile", limit: 32
|
266
|
+
t.string "blog", limit: 128
|
267
|
+
t.string "linkedin", limit: 128
|
268
|
+
t.string "facebook", limit: 128
|
269
|
+
t.string "twitter", limit: 128
|
270
|
+
t.integer "rating", default: 0, null: false
|
271
|
+
t.boolean "do_not_call", default: false, null: false
|
278
272
|
t.datetime "deleted_at"
|
279
273
|
t.datetime "created_at"
|
280
274
|
t.datetime "updated_at"
|
281
|
-
t.string
|
282
|
-
t.string
|
283
|
-
t.text
|
275
|
+
t.string "background_info"
|
276
|
+
t.string "skype", limit: 128
|
277
|
+
t.text "subscribed_users"
|
278
|
+
t.index ["assigned_to"], name: "index_leads_on_assigned_to"
|
279
|
+
t.index ["user_id", "last_name", "deleted_at"], name: "index_leads_on_user_id_and_last_name_and_deleted_at", unique: true
|
284
280
|
end
|
285
281
|
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
create_table "lists", force: :cascade do |t|
|
290
|
-
t.string "name"
|
291
|
-
t.text "url"
|
282
|
+
create_table "lists", id: :serial, force: :cascade do |t|
|
283
|
+
t.string "name"
|
284
|
+
t.text "url"
|
292
285
|
t.datetime "created_at"
|
293
286
|
t.datetime "updated_at"
|
294
|
-
t.integer
|
287
|
+
t.integer "user_id"
|
288
|
+
t.index ["user_id"], name: "index_lists_on_user_id"
|
295
289
|
end
|
296
290
|
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
t.integer
|
301
|
-
t.
|
302
|
-
t.
|
303
|
-
t.string
|
304
|
-
t.string
|
305
|
-
t.
|
306
|
-
t.
|
307
|
-
t.
|
308
|
-
t.
|
309
|
-
t.decimal "discount", precision: 12, scale: 2
|
310
|
-
t.date "closes_on"
|
291
|
+
create_table "opportunities", id: :serial, force: :cascade do |t|
|
292
|
+
t.integer "user_id"
|
293
|
+
t.integer "campaign_id"
|
294
|
+
t.integer "assigned_to"
|
295
|
+
t.string "name", limit: 64, default: "", null: false
|
296
|
+
t.string "access", limit: 8, default: "Public"
|
297
|
+
t.string "source", limit: 32
|
298
|
+
t.string "stage", limit: 32
|
299
|
+
t.integer "probability"
|
300
|
+
t.decimal "amount", precision: 12, scale: 2
|
301
|
+
t.decimal "discount", precision: 12, scale: 2
|
302
|
+
t.date "closes_on"
|
311
303
|
t.datetime "deleted_at"
|
312
304
|
t.datetime "created_at"
|
313
305
|
t.datetime "updated_at"
|
314
|
-
t.string
|
315
|
-
t.text
|
306
|
+
t.string "background_info"
|
307
|
+
t.text "subscribed_users"
|
308
|
+
t.index ["assigned_to"], name: "index_opportunities_on_assigned_to"
|
309
|
+
t.index ["user_id", "name", "deleted_at"], name: "id_name_deleted", unique: true
|
316
310
|
end
|
317
311
|
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
t.integer "user_id"
|
323
|
-
t.integer "asset_id"
|
324
|
-
t.string "asset_type"
|
312
|
+
create_table "permissions", id: :serial, force: :cascade do |t|
|
313
|
+
t.integer "user_id"
|
314
|
+
t.string "asset_type"
|
315
|
+
t.integer "asset_id"
|
325
316
|
t.datetime "created_at"
|
326
317
|
t.datetime "updated_at"
|
327
|
-
t.integer
|
318
|
+
t.integer "group_id"
|
319
|
+
t.index ["asset_id", "asset_type"], name: "index_permissions_on_asset_id_and_asset_type"
|
320
|
+
t.index ["group_id"], name: "index_permissions_on_group_id"
|
321
|
+
t.index ["user_id"], name: "index_permissions_on_user_id"
|
328
322
|
end
|
329
323
|
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
create_table "preferences", force: :cascade do |t|
|
335
|
-
t.integer "user_id"
|
336
|
-
t.string "name", limit: 32, default: "", null: false
|
337
|
-
t.text "value"
|
324
|
+
create_table "preferences", id: :serial, force: :cascade do |t|
|
325
|
+
t.integer "user_id"
|
326
|
+
t.string "name", limit: 32, default: "", null: false
|
327
|
+
t.text "value"
|
338
328
|
t.datetime "created_at"
|
339
329
|
t.datetime "updated_at"
|
330
|
+
t.index ["user_id", "name"], name: "index_preferences_on_user_id_and_name"
|
340
331
|
end
|
341
332
|
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
t.string "session_id", null: false
|
346
|
-
t.text "data"
|
333
|
+
create_table "sessions", id: :serial, force: :cascade do |t|
|
334
|
+
t.string "session_id", null: false
|
335
|
+
t.text "data"
|
347
336
|
t.datetime "created_at"
|
348
337
|
t.datetime "updated_at"
|
338
|
+
t.index ["session_id"], name: "index_sessions_on_session_id"
|
339
|
+
t.index ["updated_at"], name: "index_sessions_on_updated_at"
|
349
340
|
end
|
350
341
|
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
create_table "settings", force: :cascade do |t|
|
355
|
-
t.string "name", limit: 32, default: "", null: false
|
356
|
-
t.text "value"
|
342
|
+
create_table "settings", id: :serial, force: :cascade do |t|
|
343
|
+
t.string "name", limit: 32, default: "", null: false
|
344
|
+
t.text "value"
|
357
345
|
t.datetime "created_at"
|
358
346
|
t.datetime "updated_at"
|
347
|
+
t.index ["name"], name: "index_settings_on_name"
|
359
348
|
end
|
360
349
|
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
t.integer
|
365
|
-
t.
|
366
|
-
t.
|
367
|
-
t.string
|
368
|
-
t.string "taggable_type", limit: 50
|
369
|
-
t.string "context", limit: 50
|
350
|
+
create_table "taggings", id: :serial, force: :cascade do |t|
|
351
|
+
t.integer "tag_id"
|
352
|
+
t.integer "taggable_id"
|
353
|
+
t.integer "tagger_id"
|
354
|
+
t.string "tagger_type"
|
355
|
+
t.string "taggable_type", limit: 50
|
356
|
+
t.string "context", limit: 50
|
370
357
|
t.datetime "created_at"
|
358
|
+
t.index ["tag_id", "taggable_id", "taggable_type", "context"], name: "taggings_idx", unique: true
|
359
|
+
t.index ["taggable_id", "taggable_type", "context"], name: "index_taggings_on_taggable_id_and_taggable_type_and_context"
|
371
360
|
end
|
372
361
|
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
create_table "tags", force: :cascade do |t|
|
377
|
-
t.string "name"
|
362
|
+
create_table "tags", id: :serial, force: :cascade do |t|
|
363
|
+
t.string "name"
|
378
364
|
t.integer "taggings_count", default: 0
|
365
|
+
t.index ["name"], name: "index_tags_on_name", unique: true
|
379
366
|
end
|
380
367
|
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
t.integer
|
385
|
-
t.
|
386
|
-
t.
|
387
|
-
t.
|
388
|
-
t.
|
389
|
-
t.string
|
390
|
-
t.string
|
391
|
-
t.string "category", limit: 32
|
392
|
-
t.string "bucket", limit: 32
|
368
|
+
create_table "tasks", id: :serial, force: :cascade do |t|
|
369
|
+
t.integer "user_id"
|
370
|
+
t.integer "assigned_to"
|
371
|
+
t.integer "completed_by"
|
372
|
+
t.string "name", default: "", null: false
|
373
|
+
t.string "asset_type"
|
374
|
+
t.integer "asset_id"
|
375
|
+
t.string "priority", limit: 32
|
376
|
+
t.string "category", limit: 32
|
377
|
+
t.string "bucket", limit: 32
|
393
378
|
t.datetime "due_at"
|
394
379
|
t.datetime "completed_at"
|
395
380
|
t.datetime "deleted_at"
|
396
381
|
t.datetime "created_at"
|
397
382
|
t.datetime "updated_at"
|
398
|
-
t.string
|
399
|
-
t.text
|
383
|
+
t.string "background_info"
|
384
|
+
t.text "subscribed_users"
|
385
|
+
t.index ["assigned_to"], name: "index_tasks_on_assigned_to"
|
386
|
+
t.index ["user_id", "name", "deleted_at"], name: "index_tasks_on_user_id_and_name_and_deleted_at", unique: true
|
400
387
|
end
|
401
388
|
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
t.string
|
407
|
-
t.string
|
408
|
-
t.string
|
409
|
-
t.string
|
410
|
-
t.string
|
411
|
-
t.string
|
412
|
-
t.string
|
413
|
-
t.string
|
414
|
-
t.string
|
415
|
-
t.string
|
416
|
-
t.string
|
417
|
-
t.string
|
418
|
-
t.string
|
419
|
-
t.string
|
420
|
-
t.string "password_salt", default: "", null: false
|
421
|
-
t.string "persistence_token", default: "", null: false
|
422
|
-
t.string "perishable_token", default: "", null: false
|
389
|
+
create_table "users", id: :serial, force: :cascade do |t|
|
390
|
+
t.string "username", limit: 32, default: "", null: false
|
391
|
+
t.string "email", limit: 254, default: "", null: false
|
392
|
+
t.string "first_name", limit: 32
|
393
|
+
t.string "last_name", limit: 32
|
394
|
+
t.string "title", limit: 64
|
395
|
+
t.string "company", limit: 64
|
396
|
+
t.string "alt_email", limit: 254
|
397
|
+
t.string "phone", limit: 32
|
398
|
+
t.string "mobile", limit: 32
|
399
|
+
t.string "aim", limit: 32
|
400
|
+
t.string "yahoo", limit: 32
|
401
|
+
t.string "google", limit: 32
|
402
|
+
t.string "skype", limit: 32
|
403
|
+
t.string "password_hash", default: "", null: false
|
404
|
+
t.string "password_salt", default: "", null: false
|
405
|
+
t.string "persistence_token", default: "", null: false
|
406
|
+
t.string "perishable_token", default: "", null: false
|
423
407
|
t.datetime "last_login_at"
|
424
408
|
t.datetime "current_login_at"
|
425
|
-
t.string
|
426
|
-
t.string
|
427
|
-
t.integer
|
409
|
+
t.string "last_login_ip"
|
410
|
+
t.string "current_login_ip"
|
411
|
+
t.integer "login_count", default: 0, null: false
|
428
412
|
t.datetime "deleted_at"
|
429
413
|
t.datetime "created_at"
|
430
414
|
t.datetime "updated_at"
|
431
|
-
t.boolean
|
415
|
+
t.boolean "admin", default: false, null: false
|
432
416
|
t.datetime "suspended_at"
|
433
|
-
t.string
|
417
|
+
t.string "single_access_token"
|
418
|
+
t.index ["email"], name: "index_users_on_email"
|
419
|
+
t.index ["perishable_token"], name: "index_users_on_perishable_token"
|
420
|
+
t.index ["persistence_token"], name: "index_users_on_persistence_token"
|
421
|
+
t.index ["username", "deleted_at"], name: "index_users_on_username_and_deleted_at", unique: true
|
434
422
|
end
|
435
423
|
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
t.string "item_type", null: false
|
443
|
-
t.integer "item_id", null: false
|
444
|
-
t.string "event", limit: 512, null: false
|
445
|
-
t.string "whodunnit"
|
446
|
-
t.text "object"
|
424
|
+
create_table "versions", id: :serial, force: :cascade do |t|
|
425
|
+
t.string "item_type", null: false
|
426
|
+
t.integer "item_id", null: false
|
427
|
+
t.string "event", limit: 512, null: false
|
428
|
+
t.string "whodunnit"
|
429
|
+
t.text "object"
|
447
430
|
t.datetime "created_at"
|
448
|
-
t.text
|
449
|
-
t.integer
|
450
|
-
t.string
|
451
|
-
t.integer
|
431
|
+
t.text "object_changes"
|
432
|
+
t.integer "related_id"
|
433
|
+
t.string "related_type"
|
434
|
+
t.integer "transaction_id"
|
435
|
+
t.index ["created_at"], name: "index_versions_on_created_at"
|
436
|
+
t.index ["item_type", "item_id"], name: "index_versions_on_item_type_and_item_id"
|
437
|
+
t.index ["related_id", "related_type"], name: "index_versions_on_related_id_and_related_type"
|
438
|
+
t.index ["transaction_id"], name: "index_versions_on_transaction_id"
|
439
|
+
t.index ["whodunnit"], name: "index_versions_on_whodunnit"
|
452
440
|
end
|
453
441
|
|
454
|
-
add_index "versions", ["created_at"], name: "index_versions_on_created_at", using: :btree
|
455
|
-
add_index "versions", ["item_type", "item_id"], name: "index_versions_on_item_type_and_item_id", using: :btree
|
456
|
-
add_index "versions", ["transaction_id"], name: "index_versions_on_transaction_id", using: :btree
|
457
|
-
add_index "versions", ["whodunnit"], name: "index_versions_on_whodunnit", using: :btree
|
458
442
|
end
|