alchemy_crm 2.0.1 → 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +10 -11
- data/alchemy_crm.gemspec +21 -21
- data/app/assets/javascripts/alchemy_crm/alchemy_crm.base.js +54 -54
- data/app/assets/stylesheets/alchemy_crm/base.css.scss +199 -199
- data/app/controllers/alchemy_crm/admin/base_controller.rb +5 -5
- data/app/controllers/alchemy_crm/admin/contact_groups_controller.rb +15 -15
- data/app/controllers/alchemy_crm/admin/contacts_controller.rb +95 -95
- data/app/controllers/alchemy_crm/admin/deliveries_controller.rb +66 -66
- data/app/controllers/alchemy_crm/admin/elements_controller_extension.rb +23 -23
- data/app/controllers/alchemy_crm/admin/mailings_controller.rb +44 -44
- data/app/controllers/alchemy_crm/admin/newsletters_controller.rb +16 -16
- data/app/controllers/alchemy_crm/admin/tags_controller.rb +60 -59
- data/app/controllers/alchemy_crm/base_controller.rb +3 -3
- data/app/controllers/alchemy_crm/contacts_controller.rb +88 -88
- data/app/controllers/alchemy_crm/mailings_controller.rb +16 -16
- data/app/controllers/alchemy_crm/recipients_controller.rb +30 -30
- data/app/controllers/alchemy_crm/subscriptions_controller.rb +54 -54
- data/app/helpers/alchemy/pages_helper_extension.rb +14 -14
- data/app/helpers/alchemy_crm/admin/base_helper.rb +8 -8
- data/app/helpers/alchemy_crm/mailings_helper.rb +175 -175
- data/app/mailers/alchemy_crm/bounce_receiver.rb +9 -9
- data/app/mailers/alchemy_crm/contacts_mailer.rb +21 -21
- data/app/mailers/alchemy_crm/mailings_mailer.rb +46 -46
- data/app/mailers/alchemy_crm/subscriptions_mailer.rb +12 -12
- data/app/models/alchemy/essence_element_teaser.rb +14 -14
- data/app/models/alchemy_crm/contact.rb +260 -260
- data/app/models/alchemy_crm/contact_group.rb +15 -15
- data/app/models/alchemy_crm/contact_group_filter.rb +17 -17
- data/app/models/alchemy_crm/delivery.rb +54 -54
- data/app/models/alchemy_crm/element_extension.rb +23 -23
- data/app/models/alchemy_crm/mailing.rb +90 -90
- data/app/models/alchemy_crm/newsletter.rb +33 -33
- data/app/models/alchemy_crm/reaction.rb +5 -5
- data/app/models/alchemy_crm/recipient.rb +46 -46
- data/app/models/alchemy_crm/subscription.rb +4 -4
- data/app/views/alchemy/admin/elements/fill.js.erb +11 -11
- data/app/views/alchemy/elements/_newsletter_article_view.html.erb +14 -14
- data/app/views/alchemy/elements/_newsletter_greeting_view.html.erb +9 -9
- data/app/views/alchemy/elements/_newsletter_signout_form_view.html.erb +18 -18
- data/app/views/alchemy/elements/_newsletter_signup_form_view.html.erb +62 -62
- data/app/views/alchemy/essences/_essence_element_teaser_editor.html.erb +29 -29
- data/app/views/alchemy/newsletter_layouts/_standard.html.erb +37 -37
- data/app/views/alchemy_crm/admin/contact_groups/_contact_group.html.erb +30 -30
- data/app/views/alchemy_crm/admin/contact_groups/_filter.html.erb +28 -28
- data/app/views/alchemy_crm/admin/contact_groups/_form.html.erb +45 -45
- data/app/views/alchemy_crm/admin/contact_groups/_tag.html.erb +4 -4
- data/app/views/alchemy_crm/admin/contact_groups/add_filter.js.erb +7 -7
- data/app/views/alchemy_crm/admin/contact_groups/index.html.erb +28 -28
- data/app/views/alchemy_crm/admin/contacts/_contact.html.erb +42 -42
- data/app/views/alchemy_crm/admin/contacts/_form.html.erb +76 -76
- data/app/views/alchemy_crm/admin/contacts/import.html.erb +27 -27
- data/app/views/alchemy_crm/admin/contacts/index.html.erb +39 -39
- data/app/views/alchemy_crm/admin/contacts/vcf_import_result.html.erb +24 -24
- data/app/views/alchemy_crm/admin/deliveries/_delivery.html.erb +30 -30
- data/app/views/alchemy_crm/admin/deliveries/_form.html.erb +61 -61
- data/app/views/alchemy_crm/admin/deliveries/_recipient.html.erb +36 -36
- data/app/views/alchemy_crm/admin/deliveries/index.html.erb +21 -21
- data/app/views/alchemy_crm/admin/deliveries/show.html.erb +61 -61
- data/app/views/alchemy_crm/admin/elements/teasables.html.erb +53 -53
- data/app/views/alchemy_crm/admin/mailings/_form.html.erb +41 -41
- data/app/views/alchemy_crm/admin/mailings/_mailing.html.erb +73 -73
- data/app/views/alchemy_crm/admin/mailings/edit_content.html.erb +170 -170
- data/app/views/alchemy_crm/admin/mailings/import_result.html.erb +18 -18
- data/app/views/alchemy_crm/admin/mailings/index.html.erb +25 -25
- data/app/views/alchemy_crm/admin/newsletters/_form.html.erb +52 -52
- data/app/views/alchemy_crm/admin/newsletters/_tag_with_radiobutton.html.erb +5 -5
- data/app/views/alchemy_crm/admin/newsletters/index.html.erb +29 -29
- data/app/views/alchemy_crm/admin/newsletters/new.html.erb +4 -4
- data/app/views/alchemy_crm/admin/tags/_radio_tag.html.erb +4 -4
- data/app/views/alchemy_crm/admin/tags/_tag.html.erb +30 -30
- data/app/views/alchemy_crm/admin/tags/edit.html.erb +32 -32
- data/app/views/alchemy_crm/admin/tags/index.html.erb +23 -23
- data/app/views/alchemy_crm/admin/tags/new.html.erb +14 -14
- data/app/views/alchemy_crm/contacts_mailer/signout_mail.html.erb +6 -6
- data/app/views/alchemy_crm/contacts_mailer/signout_mail.text.erb +2 -2
- data/app/views/alchemy_crm/contacts_mailer/signup_mail.html.erb +9 -9
- data/app/views/alchemy_crm/contacts_mailer/signup_mail.text.erb +2 -2
- data/app/views/alchemy_crm/mailings_mailer/verification_mail.html.erb +9 -9
- data/app/views/alchemy_crm/subscriptions/index.html.erb +4 -4
- data/app/views/alchemy_crm/subscriptions_mailer/overview_mail.html.erb +25 -25
- data/app/views/alchemy_crm/subscriptions_mailer/overview_mail.text.erb +2 -2
- data/app/views/csv_magic/import_errors.html.erb +23 -23
- data/app/views/csv_magic/mapper.html.erb +46 -46
- data/app/views/layouts/alchemy_crm/mailings.html.erb +177 -177
- data/config/initializers/assets.rb +2 -2
- data/config/locales/alchemy_crm.de.yml +1 -1
- data/config/locales/alchemy_crm.en.yml +1 -0
- data/config/locales/localized_country_select.de.rb +260 -260
- data/config/locales/localized_country_select.en.rb +274 -274
- data/config/routes.rb +67 -67
- data/db/migrate/20111104125306_remove_sent_mailing_pdf_id_from_sent_mailings.rb +1 -1
- data/db/migrate/20111124145923_namespace_alchemy_crm_models.rb +13 -13
- data/db/migrate/20120307160721_rename_alchemy_crm_recipients_sent_mailing_id.rb +3 -3
- data/db/migrate/20120320103412_add_indexes_to_alchemy_crm_sha1_columns.rb +3 -3
- data/db/migrate/20120327174301_add_more_indexes_to_alchemy_crm_tables.rb +10 -10
- data/lib/alchemy_crm.rb +15 -15
- data/lib/alchemy_crm/bounced_delivery.rb +38 -38
- data/lib/alchemy_crm/config.rb +25 -25
- data/lib/alchemy_crm/engine.rb +31 -31
- data/lib/alchemy_crm/i18n_helpers.rb +28 -28
- data/lib/alchemy_crm/newsletter_layout.rb +28 -28
- data/lib/alchemy_crm/seeder.rb +26 -26
- data/lib/alchemy_crm/version.rb +1 -1
- data/lib/generators/alchemy_crm/scaffold/files/newsletters.html.erb +19 -19
- data/lib/generators/alchemy_crm/scaffold/scaffold_generator.rb +2 -2
- data/lib/tasks/alchemy_crm.rake +22 -22
- data/lib/tasks/routes.rake +25 -25
- data/spec/config_spec.rb +24 -24
- data/spec/controllers/alchemy_crm/contacts_controller_spec.rb +147 -147
- data/spec/controllers/alchemy_crm/mailings_controller_spec.rb +62 -62
- data/spec/controllers/alchemy_crm/recipients_controller_spec.rb +109 -109
- data/spec/helpers/alchemy_crm/mailings_helper_spec.rb +165 -165
- data/spec/mailers/alchemy_crm/contacts_mailer_spec.rb +84 -84
- data/spec/mailers/alchemy_crm/mailings_mailer_spec.rb +29 -29
- data/spec/models/alchemy_crm/contact_group_spec.rb +25 -25
- data/spec/models/alchemy_crm/contact_spec.rb +71 -71
- data/spec/models/alchemy_crm/delivery_spec.rb +43 -39
- data/spec/models/alchemy_crm/mailing_spec.rb +46 -42
- data/spec/models/alchemy_crm/newsletter_spec.rb +29 -29
- data/spec/spec_helper.rb +36 -36
- metadata +6 -8
- data/rails/init.rb +0 -1
- data/recipes/alchemy-mailings-capistrano-tasks.rb +0 -12
data/config/routes.rb
CHANGED
@@ -1,71 +1,71 @@
|
|
1
1
|
AlchemyCrm::Engine.routes.draw do
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
3
|
+
match '/recipients/:h/reads' => 'recipients#reads',
|
4
|
+
:as => 'recipient_reads'
|
5
|
+
|
6
|
+
match '/recipients/:h/reacts' => 'recipients#reacts',
|
7
|
+
:as => 'recipient_reacts'
|
8
|
+
|
9
|
+
match '/subscriptions/:token/destroy/:newsletter_id' => 'subscriptions#destroy',
|
10
|
+
:as => 'destroy_subscription'
|
11
|
+
|
12
|
+
match '/admin/elements/teasables' => 'admin/elements#teasables',
|
13
|
+
:as => 'teasable_elements'
|
14
|
+
|
15
|
+
match '/admin/elements/teasables' => 'admin/elements#teasables',
|
16
|
+
:as => 'teasable_elements'
|
17
|
+
|
18
|
+
match '/contacts/:token/verify' => 'contacts#verify',
|
19
|
+
:as => 'verify_contact'
|
20
|
+
|
21
|
+
match '/contacts/:token/disable' => 'contacts#disable',
|
22
|
+
:as => 'disable_contact'
|
23
|
+
|
24
|
+
match '/mailings/:m/show/:r' => 'mailings#show',
|
25
|
+
:as => 'show_mailing'
|
26
|
+
|
27
|
+
resources :mailings, :only => [:show]
|
28
|
+
|
29
|
+
resources :contacts do
|
30
|
+
collection do
|
31
|
+
post :signup, :signout
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
resources :subscriptions do
|
36
|
+
collection do
|
37
|
+
post :overview
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
namespace :admin do
|
42
|
+
|
43
|
+
resources :contacts do
|
44
|
+
collection do
|
45
|
+
get :import
|
46
|
+
get :autocomplete_tag_list
|
47
|
+
post :import
|
48
|
+
end
|
49
|
+
member { get :export }
|
50
|
+
end
|
51
|
+
|
52
|
+
resources :contact_groups do
|
53
|
+
collection { get :add_filter }
|
54
|
+
end
|
55
|
+
|
56
|
+
resources :tags, :newsletters
|
57
|
+
|
58
|
+
resources :deliveries
|
59
|
+
|
60
|
+
resources :mailings do
|
61
|
+
resources :deliveries
|
62
|
+
collection { get :signout }
|
63
|
+
member do
|
64
|
+
get :copy
|
65
|
+
get :edit_content
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
end
|
70
70
|
|
71
71
|
end
|
@@ -1,17 +1,17 @@
|
|
1
1
|
class NamespaceAlchemyCrmModels < ActiveRecord::Migration
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
3
|
+
def change
|
4
|
+
rename_table :mailings, :alchemy_crm_mailings
|
5
|
+
rename_table :newsletters, :alchemy_crm_newsletters
|
6
|
+
rename_table :contacts, :alchemy_crm_contacts
|
7
|
+
rename_table :sent_mailings, :alchemy_crm_deliveries
|
8
|
+
rename_table :recipients, :alchemy_crm_recipients
|
9
|
+
rename_table :contact_groups, :alchemy_crm_contact_groups
|
10
|
+
rename_table :contact_group_filters, :alchemy_crm_contact_group_filters
|
11
|
+
rename_table :newsletter_subscriptions, :alchemy_crm_subscriptions
|
12
|
+
rename_table :reactions, :alchemy_crm_reactions
|
13
|
+
rename_table :essence_element_teasers, :alchemy_essence_element_teasers
|
14
|
+
rename_table :contact_groups_newsletters, :alchemy_contact_groups_newsletters
|
15
|
+
end
|
16
16
|
|
17
17
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
class AddIndexesToAlchemyCrmSha1Columns < ActiveRecord::Migration
|
2
2
|
def change
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
add_index :alchemy_crm_contacts, :email_sha1
|
4
|
+
add_index :alchemy_crm_mailings, :sha1
|
5
|
+
add_index :alchemy_crm_recipients, :sha1
|
6
6
|
end
|
7
7
|
end
|
@@ -1,12 +1,12 @@
|
|
1
1
|
class AddMoreIndexesToAlchemyCrmTables < ActiveRecord::Migration
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
2
|
+
def change
|
3
|
+
add_index :alchemy_crm_recipients, :message_id
|
4
|
+
add_index :alchemy_crm_recipients, :email
|
5
|
+
add_index :alchemy_crm_recipients, :contact_id
|
6
|
+
add_index :alchemy_crm_recipients, :delivery_id
|
7
|
+
add_index :alchemy_crm_contacts, :email
|
8
|
+
add_index :alchemy_crm_reactions, :recipient_id
|
9
|
+
add_index :alchemy_contact_groups_newsletters, [:contact_group_id, :newsletter_id], :name => 'contact_group_newsletter_index', :unique => true
|
10
|
+
add_index :alchemy_crm_subscriptions, [:contact_id, :newsletter_id], :name => 'contact_newsletter_index', :unique => true
|
11
|
+
end
|
12
12
|
end
|
data/lib/alchemy_crm.rb
CHANGED
@@ -1,18 +1,18 @@
|
|
1
1
|
if defined?(Rails) && Rails::VERSION::MAJOR == 3
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
2
|
+
require 'acts-as-taggable-on'
|
3
|
+
require 'localized_country_select'
|
4
|
+
require 'rails3-jquery-autocomplete'
|
5
|
+
require 'vcard'
|
6
|
+
require 'csv_magic'
|
7
|
+
require 'digest/sha1'
|
8
|
+
require 'delayed_job_active_record'
|
9
|
+
require 'alchemy_cms'
|
10
|
+
require 'alchemy_crm/version'
|
11
|
+
require 'alchemy_crm/config'
|
12
|
+
require 'alchemy_crm/engine'
|
13
|
+
require 'alchemy_crm/newsletter_layout'
|
14
|
+
require "alchemy_crm/seeder"
|
15
|
+
require "alchemy_crm/i18n_helpers"
|
16
16
|
else
|
17
|
-
|
17
|
+
raise "Alchemy CRM 2.0 needs Rails 3.0 or higher. You are currently using Rails #{Rails::VERSION::MAJOR}"
|
18
18
|
end
|
@@ -1,46 +1,46 @@
|
|
1
1
|
module AlchemyCrm
|
2
|
-
|
2
|
+
class BouncedDelivery
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
4
|
+
attr_accessor :status_info, :original_message_id
|
5
|
+
attr_accessor :attr_names
|
6
|
+
attr_accessor :message
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
8
|
+
def self.from_email(email)
|
9
|
+
returning(bounce = self.new) do
|
10
|
+
plain_part = email.parts.detect do |part|
|
11
|
+
part.content_type == 'text/plain'
|
12
|
+
end
|
13
|
+
bounce.message = plain_part.body.strip
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
15
|
+
status_part = email.parts.detect do |part|
|
16
|
+
part.content_type == "message/delivery-status"
|
17
|
+
end
|
18
|
+
statuses = status_part.body.split(/\n/)
|
19
19
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
20
|
+
bounce.status_info = statuses.inject({}) do |hash, line|
|
21
|
+
key, value = line.split(/:/)
|
22
|
+
hash[key] = value.strip rescue nil
|
23
|
+
hash
|
24
|
+
end
|
25
|
+
original_message_part = email.parts.detect do |part|
|
26
|
+
part.content_type == "message/rfc822" or
|
27
|
+
part.content_type == "text/rfc822-headers"
|
28
|
+
end
|
29
|
+
parsed_msg = Mail.parse(original_message_part.body)
|
30
|
+
bounce.original_message_id = parsed_msg.message_id
|
31
|
+
end
|
32
|
+
end
|
33
33
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
34
|
+
def status
|
35
|
+
case status_info['Status']
|
36
|
+
when /^5/
|
37
|
+
'Failure'
|
38
|
+
when /^4/
|
39
|
+
'Temporary Failure'
|
40
|
+
when /^2/
|
41
|
+
'Success'
|
42
|
+
end
|
43
|
+
end
|
44
44
|
|
45
|
-
|
45
|
+
end
|
46
46
|
end
|
data/lib/alchemy_crm/config.rb
CHANGED
@@ -1,28 +1,28 @@
|
|
1
1
|
module AlchemyCrm
|
2
|
-
|
2
|
+
class Config
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
4
|
+
# Returns the configuration for given parameter
|
5
|
+
def self.get(name)
|
6
|
+
read_file[name.to_s]
|
7
|
+
end
|
8
|
+
|
9
|
+
def self.show
|
10
|
+
read_file
|
11
|
+
end
|
12
|
+
|
13
|
+
private
|
14
|
+
|
15
|
+
def self.read_file
|
16
|
+
app_config = Rails.root.join('config/alchemy_crm.config.yml')
|
17
|
+
default_config = File.join(File.dirname(__FILE__), '..', '..', 'config/alchemy_crm.config.yml')
|
18
|
+
if File.exist?(app_config)
|
19
|
+
YAML.load_file(app_config)
|
20
|
+
elsif File.exist?(default_config)
|
21
|
+
YAML.load_file(default_config)
|
22
|
+
else
|
23
|
+
raise "No config file found!"
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
28
28
|
end
|
data/lib/alchemy_crm/engine.rb
CHANGED
@@ -1,40 +1,40 @@
|
|
1
1
|
module AlchemyCrm
|
2
|
-
|
2
|
+
class Engine < Rails::Engine
|
3
3
|
|
4
|
-
|
5
|
-
|
4
|
+
isolate_namespace AlchemyCrm
|
5
|
+
engine_name 'alchemy_crm'
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
7
|
+
initializer 'alchemy_crm.register_as_alchemy_module' do
|
8
|
+
Alchemy::Modules.register_module(YAML.load_file(File.join(File.dirname(__FILE__), '../..', 'config/module_definition.yml')))
|
9
|
+
end
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
11
|
+
# Loading authorization rules and register them to auth engine instance
|
12
|
+
initializer "alchemy_crm.add_authorization_rules" do
|
13
|
+
Alchemy::AuthEngine.get_instance.load(File.join(File.dirname(__FILE__), '../..', 'config/authorization_rules.rb'))
|
14
|
+
end
|
15
15
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
16
|
+
initializer "alchemy_crm.add_newsletter_layouts" do
|
17
|
+
newsletter_layouts_file = Rails.root.join('config', 'alchemy', 'newsletter_layouts.yml')
|
18
|
+
if File.exist? newsletter_layouts_file
|
19
|
+
YAML.load_file(newsletter_layouts_file).each do |newsletter_layout|
|
20
|
+
newsletter_layout['name'] = Mailing::MAILING_PAGE_LAYOUT_PREFIX + newsletter_layout['name']
|
21
|
+
Alchemy::PageLayout.add(newsletter_layout.merge({'newsletter' => true}))
|
22
|
+
end
|
23
|
+
else
|
24
|
+
puts "!!! Alchemy CRM Warning: Newsletter Layouts File not found!\nPlease run 'rails generate alchemy_crm:scaffold' or create a 'newsletter_layouts.yml' file in config/alchemy folder."
|
25
|
+
end
|
26
|
+
end
|
27
27
|
|
28
|
-
|
29
|
-
|
30
|
-
|
28
|
+
# initializer "alchemy_crm.inject_helpers" do
|
29
|
+
# ActionView::Base.send :include, AlchemyCrm::BaseHelper
|
30
|
+
# end
|
31
31
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
32
|
+
# Loading all alchemy core extensions found in app folder.
|
33
|
+
config.to_prepare do
|
34
|
+
Dir.glob(File.join(File.dirname(__FILE__), "../../app/**/*_extension.rb")) do |e|
|
35
|
+
Rails.env.production? ? require(e) : load(e)
|
36
|
+
end
|
37
|
+
end
|
38
38
|
|
39
|
-
|
39
|
+
end
|
40
40
|
end
|