Class: PagesController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- PagesController
- Defined in:
- app/controllers/pages_controller.rb
Instance Method Summary collapse
- #animations_page ⇒ Object
- #create ⇒ Object
- #fonts_page ⇒ Object
- #global_notice_page ⇒ Object
- #index ⇒ Object
- #new ⇒ Object
- #spinners_page ⇒ Object
- #template_model_params ⇒ Object
Methods inherited from ApplicationController
Instance Method Details
#animations_page ⇒ Object
10 |
# File 'app/controllers/pages_controller.rb', line 10 def animations_page; end |
#create ⇒ Object
23 24 25 26 27 28 29 30 31 |
# File 'app/controllers/pages_controller.rb', line 23 def create @template_model = TemplateModel.new(template_model_params) if @template_model.save flash[:success] = 'Template has been created successfully.' redirect_to new_template_model_path else render :new end end |
#fonts_page ⇒ Object
6 |
# File 'app/controllers/pages_controller.rb', line 6 def fonts_page; end |
#global_notice_page ⇒ Object
12 13 14 15 16 17 |
# File 'app/controllers/pages_controller.rb', line 12 def global_notice_page flash.now[:notice] = 'Here is a notice flash message!' flash.now[:success] = 'Here is a success flash message!' flash.now[:warning] = 'Here is a warning flash message!' flash.now[:error] = 'Here is an error flash message!' end |
#index ⇒ Object
4 |
# File 'app/controllers/pages_controller.rb', line 4 def index; end |
#new ⇒ Object
19 20 21 |
# File 'app/controllers/pages_controller.rb', line 19 def new @template_model = TemplateModel.new end |
#spinners_page ⇒ Object
8 |
# File 'app/controllers/pages_controller.rb', line 8 def spinners_page; end |
#template_model_params ⇒ Object
33 34 35 |
# File 'app/controllers/pages_controller.rb', line 33 def template_model_params params.require(:template_model).permit(:first_name, :last_name, :email, :dob, :gender, :message, :level, :active) end |