Class HomeController
In: app/controllers/home_controller.rb
Parent: ApplicationController

Methods

error   feedback   index   privacy   share   stats  

Public Instance methods

[Source]

    # File app/controllers/home_controller.rb, line 28
28:   def error
29:     @error = t('errors.e404')
30:   end

[Source]

    # File app/controllers/home_controller.rb, line 13
13:   def feedback
14:     if request.post?
15:       @feedback = Mailing.new(setup_mail_params(params[:mailing]))
16:       if @feedback.save
17:         @feedback.send_feedback
18:         flash[:notice] = t('feedback.success')
19:         redirect_to root_path
20:       elsif @feedback.valid?
21:         flash[:error] = t('mailing.failure')
22:       end
23:     else
24:       @feedback = Mailing.new
25:     end
26:   end

caches_page :index, :privacy, :feedback, :error, :layout => false caches_action :share, :layout => false

[Source]

   # File app/controllers/home_controller.rb, line 7
7:   def index
8:   end

[Source]

    # File app/controllers/home_controller.rb, line 10
10:   def privacy
11:   end

[Source]

    # File app/controllers/home_controller.rb, line 35
35:   def share
36:     if request.post?
37:       @mailing = Mailing.new(setup_mail_params(params[:mailing]))
38:       if @mailing.save
39:         @mailing.send_share
40:         flash[:notice] = t('mailing.success')
41:         redirect_to root_path
42:       elsif @mailing.valid?
43:         flash[:error] = t('mailing.failure')
44:       end
45:     else
46:       @mailing = Mailing.new
47:     end
48:   end

[Source]

    # File app/controllers/home_controller.rb, line 32
32:   def stats
33:   end

[Validate]