diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index f0ba943ce6..a6255ff384 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -268,4 +268,6 @@ def find_class(asset) raise "Unknown resource" end end + + ActiveSupport.run_load_hooks(:fat_free_crm_application_controller, self) end diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb index 16e0b52c22..6f10962b5f 100644 --- a/app/controllers/comments_controller.rb +++ b/app/controllers/comments_controller.rb @@ -99,4 +99,6 @@ def comment_params def extract_commentable_name(params) params.keys.detect { |x| x =~ /_id$/ }.try(:sub, /_id$/, '') end + + ActiveSupport.run_load_hooks(:fat_free_crm_comments_controller, self) end diff --git a/app/controllers/emails_controller.rb b/app/controllers/emails_controller.rb index 85599a115b..5e8215346f 100644 --- a/app/controllers/emails_controller.rb +++ b/app/controllers/emails_controller.rb @@ -15,4 +15,6 @@ def destroy @email.destroy respond_with(@email) end + + ActiveSupport.run_load_hooks(:fat_free_crm_emails_controller, self) end diff --git a/app/controllers/entities/accounts_controller.rb b/app/controllers/entities/accounts_controller.rb index be00055c12..40b5b721d1 100644 --- a/app/controllers/entities/accounts_controller.rb +++ b/app/controllers/entities/accounts_controller.rb @@ -160,4 +160,6 @@ def get_data_for_sidebar @account_category_total[:all] = Account.my(current_user).count @account_category_total[:other] = @account_category_total[:all] - categorized end + + ActiveSupport.run_load_hooks(:fat_free_crm_accounts_controller, self) end diff --git a/app/controllers/entities/campaigns_controller.rb b/app/controllers/entities/campaigns_controller.rb index c250e72f86..f27baef0a7 100644 --- a/app/controllers/entities/campaigns_controller.rb +++ b/app/controllers/entities/campaigns_controller.rb @@ -204,4 +204,6 @@ def get_data_for_sidebar end @campaign_status_total[:other] += @campaign_status_total[:all] end + + ActiveSupport.run_load_hooks(:fat_free_crm_campaigns_controller, self) end diff --git a/app/controllers/entities/contacts_controller.rb b/app/controllers/entities/contacts_controller.rb index bcdf7bbcdc..d90b976017 100644 --- a/app/controllers/entities/contacts_controller.rb +++ b/app/controllers/entities/contacts_controller.rb @@ -164,4 +164,6 @@ def respond_to_destroy(method) redirect_to contacts_path end end + + ActiveSupport.run_load_hooks(:fat_free_crm_contacts_controller, self) end diff --git a/app/controllers/entities/leads_controller.rb b/app/controllers/entities/leads_controller.rb index 04603a4128..7bcd72392e 100644 --- a/app/controllers/entities/leads_controller.rb +++ b/app/controllers/entities/leads_controller.rb @@ -268,4 +268,6 @@ def update_sidebar get_data_for_sidebar(:campaign) end end + + ActiveSupport.run_load_hooks(:fat_free_crm_leads_controller, self) end diff --git a/app/controllers/entities/opportunities_controller.rb b/app/controllers/entities/opportunities_controller.rb index b59719693b..99821178ad 100644 --- a/app/controllers/entities/opportunities_controller.rb +++ b/app/controllers/entities/opportunities_controller.rb @@ -227,4 +227,6 @@ def set_params current_user.pref[:opportunities_sort_by] = Opportunity.sort_by_map[params[:sort_by]] if params[:sort_by] session[:opportunities_filter] = params[:stage] if params[:stage] end + + ActiveSupport.run_load_hooks(:fat_free_crm_opportunities_controller, self) end diff --git a/app/controllers/entities_controller.rb b/app/controllers/entities_controller.rb index bb91ab3006..69654e5bcd 100755 --- a/app/controllers/entities_controller.rb +++ b/app/controllers/entities_controller.rb @@ -245,4 +245,6 @@ def guess_related_account(id, url, user) Account.new(user: user) end end + + ActiveSupport.run_load_hooks(:fat_free_crm_entities_controller, self) end diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb index 4a4374c725..3e8b9e739b 100644 --- a/app/controllers/home_controller.rb +++ b/app/controllers/home_controller.rb @@ -165,4 +165,6 @@ def activity_duration %w[zero one two].index(words.first).send(words.last) if %w[one two].include?(words.first) && %w[hour day days week weeks month].include?(words.last) end end + + ActiveSupport.run_load_hooks(:fat_free_crm_home_controller, self) end diff --git a/app/controllers/lists_controller.rb b/app/controllers/lists_controller.rb index c2a6cc0654..1d7c5739c5 100644 --- a/app/controllers/lists_controller.rb +++ b/app/controllers/lists_controller.rb @@ -39,4 +39,6 @@ def list_params :user_id ) end + + ActiveSupport.run_load_hooks(:fat_free_crm_lists_controller, self) end diff --git a/app/controllers/tasks_controller.rb b/app/controllers/tasks_controller.rb index 0742a2623d..918da165af 100644 --- a/app/controllers/tasks_controller.rb +++ b/app/controllers/tasks_controller.rb @@ -224,4 +224,6 @@ def view views = Task::ALLOWED_VIEWS views.include?(view) ? view : views.first end + + ActiveSupport.run_load_hooks(:fat_free_crm_tasks_controller, self) end diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 929f50e5b9..9f5bfd7405 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -143,4 +143,6 @@ def avatar_params .permit(:image) .merge(entity: @user, user_id: @user.id) end + + ActiveSupport.run_load_hooks(:fat_free_crm_users_controller, self) end