Class: PagesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/pages_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#get_search_params

Instance Method Details

#animations_pageObject



10
# File 'app/controllers/pages_controller.rb', line 10

def animations_page; end

#createObject



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_pageObject



6
# File 'app/controllers/pages_controller.rb', line 6

def fonts_page; end

#global_notice_pageObject



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

#indexObject



4
# File 'app/controllers/pages_controller.rb', line 4

def index; end

#newObject



19
20
21
# File 'app/controllers/pages_controller.rb', line 19

def new
  @template_model = TemplateModel.new
end

#spinners_pageObject



8
# File 'app/controllers/pages_controller.rb', line 8

def spinners_page; end

#template_model_paramsObject



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