Module: Generapp::Actions::Views

Included in:
Generapp::AppBuilder
Defined in:
lib/generapp/actions/views.rb

Overview

App views configuration associated actions

Instance Method Summary collapse

Instance Method Details

#create_application_layoutObject



25
26
27
28
29
# File 'lib/generapp/actions/views.rb', line 25

def create_application_layout
  template 'views/generapp_layout.html.erb.erb',
           'app/views/layouts/application.html.erb',
           force: true
end

#create_shared_directoryObject



6
7
8
# File 'lib/generapp/actions/views.rb', line 6

def create_shared_directory
  empty_directory_with_keep_file 'app/views/shared'
end

#create_shared_flashesObject



10
11
12
13
# File 'lib/generapp/actions/views.rb', line 10

def create_shared_flashes
  copy_file 'views/_flashes.html.erb',
            'app/views/shared/_flashes.html.erb'
end

#create_shared_headObject



20
21
22
23
# File 'lib/generapp/actions/views.rb', line 20

def create_shared_head
  template 'views/_head.html.erb.erb',
           'app/views/shared/_head.html.erb'
end

#create_shared_javascriptsObject



15
16
17
18
# File 'lib/generapp/actions/views.rb', line 15

def create_shared_javascripts
  copy_file 'views/_javascript.html.erb',
            'app/views/shared/_javascript.html.erb'
end