Class: AlchemyCrm::SubscriptionsController
Instance Method Summary
collapse
#alchemy_crm_t, #i18n_t, included, #translate_model_attribute
Instance Method Details
#create ⇒ Object
17
18
19
|
# File 'app/controllers/alchemy_crm/subscriptions_controller.rb', line 17
def create
end
|
#destroy ⇒ Object
29
30
31
32
33
34
35
36
|
# File 'app/controllers/alchemy_crm/subscriptions_controller.rb', line 29
def destroy
@subscription = @contact.subscriptions.find(params[:subscription_id])
@subscription.destroy
flash[:notice] = alchemy_crm_t(:subscription_destroyed)
@page = Alchemy::Page.find_by_page_layout('newsletter_views')
@root_page = @page.get_language_root
render :template => 'alchemy/pages/show', :layout => layout_for_page
end
|
#edit ⇒ Object
21
22
23
|
# File 'app/controllers/alchemy_crm/subscriptions_controller.rb', line 21
def edit
end
|
#index ⇒ Object
7
8
9
10
11
|
# File 'app/controllers/alchemy_crm/subscriptions_controller.rb', line 7
def index
@page = Alchemy::Page.find_by_page_layout('newsletter_views')
@root_page = @page.get_language_root
render :template => 'alchemy/pages/show', :layout => layout_for_page
end
|
#new ⇒ Object
13
14
15
|
# File 'app/controllers/alchemy_crm/subscriptions_controller.rb', line 13
def new
end
|
#overview ⇒ Object
38
39
40
41
42
43
44
45
46
47
48
|
# File 'app/controllers/alchemy_crm/subscriptions_controller.rb', line 38
def overview
@contact = Contact.find_by_email(params[:email])
if @contact
SubscriptionsMailer.overview_mail.deliver(@contact, @element)
flash[:notice] = alchemy_crm_t(:send_subscriptions_overview_via_email)
redirect_to :index
else
flash[:error] = alchemy_crm_t(:no_subscriber_found)
render :index
end
end
|
#update ⇒ Object
25
26
27
|
# File 'app/controllers/alchemy_crm/subscriptions_controller.rb', line 25
def update
end
|