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.
Files changed (123) hide show
  1. data/Gemfile +10 -11
  2. data/alchemy_crm.gemspec +21 -21
  3. data/app/assets/javascripts/alchemy_crm/alchemy_crm.base.js +54 -54
  4. data/app/assets/stylesheets/alchemy_crm/base.css.scss +199 -199
  5. data/app/controllers/alchemy_crm/admin/base_controller.rb +5 -5
  6. data/app/controllers/alchemy_crm/admin/contact_groups_controller.rb +15 -15
  7. data/app/controllers/alchemy_crm/admin/contacts_controller.rb +95 -95
  8. data/app/controllers/alchemy_crm/admin/deliveries_controller.rb +66 -66
  9. data/app/controllers/alchemy_crm/admin/elements_controller_extension.rb +23 -23
  10. data/app/controllers/alchemy_crm/admin/mailings_controller.rb +44 -44
  11. data/app/controllers/alchemy_crm/admin/newsletters_controller.rb +16 -16
  12. data/app/controllers/alchemy_crm/admin/tags_controller.rb +60 -59
  13. data/app/controllers/alchemy_crm/base_controller.rb +3 -3
  14. data/app/controllers/alchemy_crm/contacts_controller.rb +88 -88
  15. data/app/controllers/alchemy_crm/mailings_controller.rb +16 -16
  16. data/app/controllers/alchemy_crm/recipients_controller.rb +30 -30
  17. data/app/controllers/alchemy_crm/subscriptions_controller.rb +54 -54
  18. data/app/helpers/alchemy/pages_helper_extension.rb +14 -14
  19. data/app/helpers/alchemy_crm/admin/base_helper.rb +8 -8
  20. data/app/helpers/alchemy_crm/mailings_helper.rb +175 -175
  21. data/app/mailers/alchemy_crm/bounce_receiver.rb +9 -9
  22. data/app/mailers/alchemy_crm/contacts_mailer.rb +21 -21
  23. data/app/mailers/alchemy_crm/mailings_mailer.rb +46 -46
  24. data/app/mailers/alchemy_crm/subscriptions_mailer.rb +12 -12
  25. data/app/models/alchemy/essence_element_teaser.rb +14 -14
  26. data/app/models/alchemy_crm/contact.rb +260 -260
  27. data/app/models/alchemy_crm/contact_group.rb +15 -15
  28. data/app/models/alchemy_crm/contact_group_filter.rb +17 -17
  29. data/app/models/alchemy_crm/delivery.rb +54 -54
  30. data/app/models/alchemy_crm/element_extension.rb +23 -23
  31. data/app/models/alchemy_crm/mailing.rb +90 -90
  32. data/app/models/alchemy_crm/newsletter.rb +33 -33
  33. data/app/models/alchemy_crm/reaction.rb +5 -5
  34. data/app/models/alchemy_crm/recipient.rb +46 -46
  35. data/app/models/alchemy_crm/subscription.rb +4 -4
  36. data/app/views/alchemy/admin/elements/fill.js.erb +11 -11
  37. data/app/views/alchemy/elements/_newsletter_article_view.html.erb +14 -14
  38. data/app/views/alchemy/elements/_newsletter_greeting_view.html.erb +9 -9
  39. data/app/views/alchemy/elements/_newsletter_signout_form_view.html.erb +18 -18
  40. data/app/views/alchemy/elements/_newsletter_signup_form_view.html.erb +62 -62
  41. data/app/views/alchemy/essences/_essence_element_teaser_editor.html.erb +29 -29
  42. data/app/views/alchemy/newsletter_layouts/_standard.html.erb +37 -37
  43. data/app/views/alchemy_crm/admin/contact_groups/_contact_group.html.erb +30 -30
  44. data/app/views/alchemy_crm/admin/contact_groups/_filter.html.erb +28 -28
  45. data/app/views/alchemy_crm/admin/contact_groups/_form.html.erb +45 -45
  46. data/app/views/alchemy_crm/admin/contact_groups/_tag.html.erb +4 -4
  47. data/app/views/alchemy_crm/admin/contact_groups/add_filter.js.erb +7 -7
  48. data/app/views/alchemy_crm/admin/contact_groups/index.html.erb +28 -28
  49. data/app/views/alchemy_crm/admin/contacts/_contact.html.erb +42 -42
  50. data/app/views/alchemy_crm/admin/contacts/_form.html.erb +76 -76
  51. data/app/views/alchemy_crm/admin/contacts/import.html.erb +27 -27
  52. data/app/views/alchemy_crm/admin/contacts/index.html.erb +39 -39
  53. data/app/views/alchemy_crm/admin/contacts/vcf_import_result.html.erb +24 -24
  54. data/app/views/alchemy_crm/admin/deliveries/_delivery.html.erb +30 -30
  55. data/app/views/alchemy_crm/admin/deliveries/_form.html.erb +61 -61
  56. data/app/views/alchemy_crm/admin/deliveries/_recipient.html.erb +36 -36
  57. data/app/views/alchemy_crm/admin/deliveries/index.html.erb +21 -21
  58. data/app/views/alchemy_crm/admin/deliveries/show.html.erb +61 -61
  59. data/app/views/alchemy_crm/admin/elements/teasables.html.erb +53 -53
  60. data/app/views/alchemy_crm/admin/mailings/_form.html.erb +41 -41
  61. data/app/views/alchemy_crm/admin/mailings/_mailing.html.erb +73 -73
  62. data/app/views/alchemy_crm/admin/mailings/edit_content.html.erb +170 -170
  63. data/app/views/alchemy_crm/admin/mailings/import_result.html.erb +18 -18
  64. data/app/views/alchemy_crm/admin/mailings/index.html.erb +25 -25
  65. data/app/views/alchemy_crm/admin/newsletters/_form.html.erb +52 -52
  66. data/app/views/alchemy_crm/admin/newsletters/_tag_with_radiobutton.html.erb +5 -5
  67. data/app/views/alchemy_crm/admin/newsletters/index.html.erb +29 -29
  68. data/app/views/alchemy_crm/admin/newsletters/new.html.erb +4 -4
  69. data/app/views/alchemy_crm/admin/tags/_radio_tag.html.erb +4 -4
  70. data/app/views/alchemy_crm/admin/tags/_tag.html.erb +30 -30
  71. data/app/views/alchemy_crm/admin/tags/edit.html.erb +32 -32
  72. data/app/views/alchemy_crm/admin/tags/index.html.erb +23 -23
  73. data/app/views/alchemy_crm/admin/tags/new.html.erb +14 -14
  74. data/app/views/alchemy_crm/contacts_mailer/signout_mail.html.erb +6 -6
  75. data/app/views/alchemy_crm/contacts_mailer/signout_mail.text.erb +2 -2
  76. data/app/views/alchemy_crm/contacts_mailer/signup_mail.html.erb +9 -9
  77. data/app/views/alchemy_crm/contacts_mailer/signup_mail.text.erb +2 -2
  78. data/app/views/alchemy_crm/mailings_mailer/verification_mail.html.erb +9 -9
  79. data/app/views/alchemy_crm/subscriptions/index.html.erb +4 -4
  80. data/app/views/alchemy_crm/subscriptions_mailer/overview_mail.html.erb +25 -25
  81. data/app/views/alchemy_crm/subscriptions_mailer/overview_mail.text.erb +2 -2
  82. data/app/views/csv_magic/import_errors.html.erb +23 -23
  83. data/app/views/csv_magic/mapper.html.erb +46 -46
  84. data/app/views/layouts/alchemy_crm/mailings.html.erb +177 -177
  85. data/config/initializers/assets.rb +2 -2
  86. data/config/locales/alchemy_crm.de.yml +1 -1
  87. data/config/locales/alchemy_crm.en.yml +1 -0
  88. data/config/locales/localized_country_select.de.rb +260 -260
  89. data/config/locales/localized_country_select.en.rb +274 -274
  90. data/config/routes.rb +67 -67
  91. data/db/migrate/20111104125306_remove_sent_mailing_pdf_id_from_sent_mailings.rb +1 -1
  92. data/db/migrate/20111124145923_namespace_alchemy_crm_models.rb +13 -13
  93. data/db/migrate/20120307160721_rename_alchemy_crm_recipients_sent_mailing_id.rb +3 -3
  94. data/db/migrate/20120320103412_add_indexes_to_alchemy_crm_sha1_columns.rb +3 -3
  95. data/db/migrate/20120327174301_add_more_indexes_to_alchemy_crm_tables.rb +10 -10
  96. data/lib/alchemy_crm.rb +15 -15
  97. data/lib/alchemy_crm/bounced_delivery.rb +38 -38
  98. data/lib/alchemy_crm/config.rb +25 -25
  99. data/lib/alchemy_crm/engine.rb +31 -31
  100. data/lib/alchemy_crm/i18n_helpers.rb +28 -28
  101. data/lib/alchemy_crm/newsletter_layout.rb +28 -28
  102. data/lib/alchemy_crm/seeder.rb +26 -26
  103. data/lib/alchemy_crm/version.rb +1 -1
  104. data/lib/generators/alchemy_crm/scaffold/files/newsletters.html.erb +19 -19
  105. data/lib/generators/alchemy_crm/scaffold/scaffold_generator.rb +2 -2
  106. data/lib/tasks/alchemy_crm.rake +22 -22
  107. data/lib/tasks/routes.rake +25 -25
  108. data/spec/config_spec.rb +24 -24
  109. data/spec/controllers/alchemy_crm/contacts_controller_spec.rb +147 -147
  110. data/spec/controllers/alchemy_crm/mailings_controller_spec.rb +62 -62
  111. data/spec/controllers/alchemy_crm/recipients_controller_spec.rb +109 -109
  112. data/spec/helpers/alchemy_crm/mailings_helper_spec.rb +165 -165
  113. data/spec/mailers/alchemy_crm/contacts_mailer_spec.rb +84 -84
  114. data/spec/mailers/alchemy_crm/mailings_mailer_spec.rb +29 -29
  115. data/spec/models/alchemy_crm/contact_group_spec.rb +25 -25
  116. data/spec/models/alchemy_crm/contact_spec.rb +71 -71
  117. data/spec/models/alchemy_crm/delivery_spec.rb +43 -39
  118. data/spec/models/alchemy_crm/mailing_spec.rb +46 -42
  119. data/spec/models/alchemy_crm/newsletter_spec.rb +29 -29
  120. data/spec/spec_helper.rb +36 -36
  121. metadata +6 -8
  122. data/rails/init.rb +0 -1
  123. data/recipes/alchemy-mailings-capistrano-tasks.rb +0 -12
@@ -1,47 +1,47 @@
1
1
  # encoding: UTF-8
2
2
  module AlchemyCrm
3
- module Admin
4
- class MailingsController < AlchemyCrm::Admin::BaseController
5
-
6
- before_filter :load_newsletters, :only => [:new, :edit, :copy]
7
-
8
- helper 'AlchemyCrm::Mailings'
9
- helper 'Alchemy::Admin::Pages'
10
-
11
- def copy
12
- @mailing = Mailing.copy(params[:id])
13
- render :action => :new, :layout => false
14
- end
15
-
16
- def show
17
- @mailing = Mailing.find(params[:id])
18
- @page = @mailing.page
19
- @contact = Contact.fake
20
- @recipient = Recipient.new_from_contact(@contact)
21
- @preview_mode = true
22
- render :layout => 'alchemy_crm/mailings'
23
- end
24
-
25
- def edit_content
26
- @mailing = Mailing.find(params[:id])
27
- @page = @mailing.page
28
- end
29
-
30
- def update
31
- @mailing.update_attributes(params[:mailing], :as => current_user.role.to_sym)
32
- render_errors_or_redirect(
33
- @mailing,
34
- :back,
35
- flash_notice_for_resource_action
36
- )
37
- end
38
-
39
- private
40
-
41
- def load_newsletters
42
- @newsletters = Newsletter.all
43
- end
44
-
45
- end
46
- end
3
+ module Admin
4
+ class MailingsController < AlchemyCrm::Admin::BaseController
5
+
6
+ before_filter :load_newsletters, :only => [:new, :edit, :copy]
7
+
8
+ helper 'AlchemyCrm::Mailings'
9
+ helper 'Alchemy::Admin::Pages'
10
+
11
+ def copy
12
+ @mailing = Mailing.copy(params[:id])
13
+ render :action => :new, :layout => false
14
+ end
15
+
16
+ def show
17
+ @mailing = Mailing.find(params[:id])
18
+ @page = @mailing.page
19
+ @contact = Contact.fake
20
+ @recipient = Recipient.new_from_contact(@contact)
21
+ @preview_mode = true
22
+ render :layout => 'alchemy_crm/mailings'
23
+ end
24
+
25
+ def edit_content
26
+ @mailing = Mailing.find(params[:id])
27
+ @page = @mailing.page
28
+ end
29
+
30
+ def update
31
+ @mailing.update_attributes(params[:mailing], :as => current_user.role.to_sym)
32
+ render_errors_or_redirect(
33
+ @mailing,
34
+ :back,
35
+ flash_notice_for_resource_action
36
+ )
37
+ end
38
+
39
+ private
40
+
41
+ def load_newsletters
42
+ @newsletters = Newsletter.all
43
+ end
44
+
45
+ end
46
+ end
47
47
  end
@@ -1,24 +1,24 @@
1
1
  # encoding: UTF-8
2
2
  module AlchemyCrm
3
- module Admin
4
- class NewslettersController < AlchemyCrm::Admin::BaseController
3
+ module Admin
4
+ class NewslettersController < AlchemyCrm::Admin::BaseController
5
5
 
6
- before_filter :load_additional_data, :only => [:new, :edit]
6
+ before_filter :load_additional_data, :only => [:new, :edit]
7
7
 
8
- def update
9
- params[:newsletter][:contact_group_ids] ||= []
10
- @newsletter = Newsletter.find(params[:id])
11
- @newsletter.update_attributes(params[:newsletter])
12
- render_errors_or_redirect @newsletter, admin_newsletters_path, alchemy_crm_t(:successfully_updated_newsletter)
13
- end
8
+ def update
9
+ params[:newsletter][:contact_group_ids] ||= []
10
+ @newsletter = Newsletter.find(params[:id])
11
+ @newsletter.update_attributes(params[:newsletter])
12
+ render_errors_or_redirect @newsletter, admin_newsletters_path, alchemy_crm_t(:successfully_updated_newsletter)
13
+ end
14
14
 
15
- private
15
+ private
16
16
 
17
- def load_additional_data
18
- @page_layouts = AlchemyCrm::NewsletterLayout.get_layouts_for_select()
19
- @contact_groups = ContactGroup.order("name ASC").all
20
- end
17
+ def load_additional_data
18
+ @page_layouts = AlchemyCrm::NewsletterLayout.get_layouts_for_select()
19
+ @contact_groups = ContactGroup.order("name ASC").all
20
+ end
21
21
 
22
- end
23
- end
22
+ end
23
+ end
24
24
  end
@@ -1,62 +1,63 @@
1
1
  # encoding: UTF-8
2
2
  module AlchemyCrm
3
- module Admin
4
- class TagsController < Alchemy::Admin::BaseController
5
-
6
- include I18nHelpers
7
- helper 'AlchemyCrm::Admin::Base'
8
-
9
- before_filter :load_tag, :only => [:edit, :update, :destroy]
10
-
11
- def index
12
- @tags = ActsAsTaggableOn::Tag.where(
13
- "name LIKE '%#{params[:query]}%'"
14
- ).page(params[:page] || 1).per(per_page_value_for_screen_size).order("name ASC")
15
- end
16
-
17
- def new
18
- @tag = ActsAsTaggableOn::Tag.new
19
- render :layout => false
20
- end
21
-
22
- def create
23
- @tag = ActsAsTaggableOn::Tag.create(params[:tag])
24
- render_errors_or_redirect @tag, admin_tags_path, alchemy_crm_t('New Tag Created')
25
- end
26
-
27
- def edit
28
- @tags = ActsAsTaggableOn::Tag.order("name ASC").all - [@tag]
29
- render :layout => false
30
- end
31
-
32
- def update
33
- if params[:replace]
34
- @new_tag = ActsAsTaggableOn::Tag.find(params[:tag][:merge_to])
35
- Contact.replace_tag @tag, @new_tag
36
- operation_text = alchemy_crm_t('Replaced Tag %{old_tag} with %{new_tag}') % {:old_tag => @tag.name, :new_tag => @new_tag.name}
37
- @tag.destroy
38
- else
39
- @tag.update_attributes(params[:tag])
40
- @tag.save
41
- operation_text = t(:successfully_updated_tag)
42
- end
43
- render_errors_or_redirect @tag, admin_tags_path, operation_text
44
- end
45
-
46
- def destroy
47
- if request.delete?
48
- @tag.destroy
49
- flash[:notice] = t(:successfully_deleted_tag)
50
- end
51
- redirect_to admin_tags_path
52
- end
53
-
54
- private
55
-
56
- def load_tag
57
- @tag = ActsAsTaggableOn::Tag.find(params[:id])
58
- end
59
-
60
- end
61
- end
3
+ module Admin
4
+ class TagsController < Alchemy::Admin::BaseController
5
+
6
+ include I18nHelpers
7
+ helper 'AlchemyCrm::Admin::Base'
8
+
9
+ before_filter :load_tag, :only => [:edit, :update, :destroy]
10
+
11
+ def index
12
+ @tags = ActsAsTaggableOn::Tag.where(
13
+ "name LIKE '%#{params[:query]}%'"
14
+ ).page(params[:page] || 1).per(per_page_value_for_screen_size).order("name ASC")
15
+ end
16
+
17
+ def new
18
+ @tag = ActsAsTaggableOn::Tag.new
19
+ render :layout => false
20
+ end
21
+
22
+ def create
23
+ @tag = ActsAsTaggableOn::Tag.create(params[:tag])
24
+ render_errors_or_redirect @tag, admin_tags_path, alchemy_crm_t('New Tag Created')
25
+ end
26
+
27
+ def edit
28
+ @tags = ActsAsTaggableOn::Tag.order("name ASC").all - [@tag]
29
+ render :layout => false
30
+ end
31
+
32
+ def update
33
+ if params[:replace]
34
+ @new_tag = ActsAsTaggableOn::Tag.find(params[:tag][:merge_to])
35
+ Contact.replace_tag @tag, @new_tag
36
+ operation_text = alchemy_crm_t('Replaced Tag %{old_tag} with %{new_tag}') % {:old_tag => @tag.name, :new_tag => @new_tag.name}
37
+ @tag.destroy
38
+ else
39
+ @tag.update_attributes(params[:tag])
40
+ @tag.save
41
+ operation_text = alchemy_crm_t(:successfully_updated_tag)
42
+ end
43
+ render_errors_or_redirect @tag, admin_tags_path, operation_text
44
+ end
45
+
46
+ def destroy
47
+ if request.delete?
48
+ @tag.destroy
49
+ flash[:notice] = alchemy_crm_t(:successfully_deleted_tag)
50
+ end
51
+ @redirect_url = admin_tags_path
52
+ render :action => :redirect
53
+ end
54
+
55
+ private
56
+
57
+ def load_tag
58
+ @tag = ActsAsTaggableOn::Tag.find(params[:id])
59
+ end
60
+
61
+ end
62
+ end
62
63
  end
@@ -1,5 +1,5 @@
1
1
  module AlchemyCrm
2
- class BaseController < Alchemy::BaseController
3
- include I18nHelpers
4
- end
2
+ class BaseController < Alchemy::BaseController
3
+ include I18nHelpers
4
+ end
5
5
  end
@@ -1,103 +1,103 @@
1
1
  # encoding: UTF-8
2
2
  module AlchemyCrm
3
- class ContactsController < AlchemyCrm::BaseController
3
+ class ContactsController < AlchemyCrm::BaseController
4
4
 
5
- helper 'Alchemy::Pages'
6
- layout :layout_for_page
5
+ helper 'Alchemy::Pages'
6
+ layout :layout_for_page
7
7
 
8
- before_filter :load_signup_form, :only => [:show, :signup, :verify]
9
- before_filter :load_signout_form, :only => [:signout, :disable]
8
+ before_filter :load_signup_form, :only => [:show, :signup, :verify]
9
+ before_filter :load_signout_form, :only => [:signout, :disable]
10
10
 
11
- def show
12
- @page = @element.page
13
- @root_page = @page.get_language_root
14
- render :template => 'alchemy/pages/show'
15
- end
11
+ def show
12
+ @page = @element.page
13
+ @root_page = @page.get_language_root
14
+ render :template => 'alchemy/pages/show'
15
+ end
16
16
 
17
- def signup
18
- @contact = Contact.new(params[:contact])
19
- if @contact.save
20
- ContactsMailer.signup_mail(
21
- @contact,
22
- Alchemy::Page.find_by_page_layout_and_language_id('newsletter_mails', session[:language_id])
23
- ).deliver
24
- @contact_signed_up = true
25
- else
26
- @contact_signed_up = false
27
- end
28
- @page = @element.page
29
- @root_page = @page.get_language_root
30
- render :template => 'alchemy/pages/show'
31
- end
17
+ def signup
18
+ @contact = Contact.new(params[:contact])
19
+ if @contact.save
20
+ ContactsMailer.signup_mail(
21
+ @contact,
22
+ Alchemy::Page.find_by_page_layout_and_language_id('newsletter_mails', session[:language_id])
23
+ ).deliver
24
+ @contact_signed_up = true
25
+ else
26
+ @contact_signed_up = false
27
+ end
28
+ @page = @element.page
29
+ @root_page = @page.get_language_root
30
+ render :template => 'alchemy/pages/show'
31
+ end
32
32
 
33
- def verify
34
- @contact = Contact.find_by_email_sha1(params[:token])
35
- if @contact
36
- @contact_verified = @contact.update_attribute(:verified, true)
37
- if params[:newsletter_ids]
38
- @subscriptions = @contact.subscriptions.where(:newsletter_id => params[:newsletter_ids])
39
- else
40
- @subscriptions = @contact.subscriptions
41
- end
42
- @subscriptions.each do |subscription|
43
- subscription.update_attribute(:verified, true)
44
- end
45
- @page = @element.page
46
- @root_page = @page.get_language_root
47
- render :template => 'alchemy/pages/show'
48
- else
49
- contact_not_found
50
- end
51
- end
33
+ def verify
34
+ @contact = Contact.find_by_email_sha1(params[:token])
35
+ if @contact
36
+ @contact_verified = @contact.update_attribute(:verified, true)
37
+ if params[:newsletter_ids]
38
+ @subscriptions = @contact.subscriptions.where(:newsletter_id => params[:newsletter_ids])
39
+ else
40
+ @subscriptions = @contact.subscriptions
41
+ end
42
+ @subscriptions.each do |subscription|
43
+ subscription.update_attribute(:verified, true)
44
+ end
45
+ @page = @element.page
46
+ @root_page = @page.get_language_root
47
+ render :template => 'alchemy/pages/show'
48
+ else
49
+ contact_not_found
50
+ end
51
+ end
52
52
 
53
- def signout
54
- @contact = Contact.find_by_email_and_verified(params[:email], true)
55
- if @contact.blank?
56
- flash[:notice] = ::I18n.t(:contact_unknown, :scope => :alchemy_crm)
57
- @contact_signed_out = false
58
- else
59
- ContactsMailer.signout_mail(
60
- @contact,
61
- Alchemy::Page.find_by_page_layout_and_language_id('newsletter_mails', session[:language_id])
62
- ).deliver
63
- @contact_signed_out = true
64
- end
65
- @page = @element.page
66
- @root_page = @page.get_language_root
67
- render :template => 'alchemy/pages/show'
68
- end
53
+ def signout
54
+ @contact = Contact.find_by_email_and_verified(params[:email], true)
55
+ if @contact.blank?
56
+ flash[:notice] = ::I18n.t(:contact_unknown, :scope => :alchemy_crm)
57
+ @contact_signed_out = false
58
+ else
59
+ ContactsMailer.signout_mail(
60
+ @contact,
61
+ Alchemy::Page.find_by_page_layout_and_language_id('newsletter_mails', session[:language_id])
62
+ ).deliver
63
+ @contact_signed_out = true
64
+ end
65
+ @page = @element.page
66
+ @root_page = @page.get_language_root
67
+ render :template => 'alchemy/pages/show'
68
+ end
69
69
 
70
- def disable
71
- @contact = Contact.find_by_email_sha1(params[:token])
72
- if @contact
73
- @contact_disabled = @contact.disable!
74
- @page = @element.page
75
- @root_page = @page.get_language_root
76
- render :template => 'alchemy/pages/show'
77
- else
78
- contact_not_found
79
- end
80
- end
70
+ def disable
71
+ @contact = Contact.find_by_email_sha1(params[:token])
72
+ if @contact
73
+ @contact_disabled = @contact.disable!
74
+ @page = @element.page
75
+ @root_page = @page.get_language_root
76
+ render :template => 'alchemy/pages/show'
77
+ else
78
+ contact_not_found
79
+ end
80
+ end
81
81
 
82
- private
82
+ private
83
83
 
84
- def load_signup_form
85
- @element = Alchemy::Element.find_by_name('newsletter_signup_form')
86
- if @element.blank?
87
- raise ActiveRecord::RecordNotFound, "Alchemy::Element with name 'newsletter_signup_form' not found!"
88
- end
89
- end
84
+ def load_signup_form
85
+ @element = Alchemy::Element.find_by_name('newsletter_signup_form')
86
+ if @element.blank?
87
+ raise ActiveRecord::RecordNotFound, "Alchemy::Element with name 'newsletter_signup_form' not found!"
88
+ end
89
+ end
90
90
 
91
- def load_signout_form
92
- @element = Alchemy::Element.find_by_name('newsletter_signout_form')
93
- if @element.blank?
94
- raise ActiveRecord::RecordNotFound, "Alchemy::Element with name 'newsletter_signout_form' not found!"
95
- end
96
- end
91
+ def load_signout_form
92
+ @element = Alchemy::Element.find_by_name('newsletter_signout_form')
93
+ if @element.blank?
94
+ raise ActiveRecord::RecordNotFound, "Alchemy::Element with name 'newsletter_signout_form' not found!"
95
+ end
96
+ end
97
97
 
98
- def contact_not_found
99
- raise ActionController::RoutingError.new('Contact Not Found')
100
- end
98
+ def contact_not_found
99
+ raise ActionController::RoutingError.new('Contact Not Found')
100
+ end
101
101
 
102
- end
102
+ end
103
103
  end