Class: SubscribersController
Instance Method Summary
collapse
caches_page_with_cache_marker, #raise_not_found!
Instance Method Details
#create ⇒ Object
6
7
8
9
10
11
12
13
14
15
16
|
# File 'app/controllers/subscribers_controller.rb', line 6
def create
@subscriber = SubscribeForm.new(subscriber_params)
@subscriber.valid? && @subscriber.submit
params[:from] ||= params[:subscriber][:from]
respond_to do |format|
format.js { render }
format.all { redirect_to(root_path) }
end
end
|
#show ⇒ Object
18
19
20
21
22
23
24
25
|
# File 'app/controllers/subscribers_controller.rb', line 18
def show
if params[:confirmation_token].present?
subscribe!
respond_with @subscriber
else
render_404
end
end
|