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



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

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

#create_humans_txtObject



32
33
34
35
# File 'lib/generapp/actions/views.rb', line 32

def create_humans_txt
  copy_file 'public/humans.txt',
            'public/humans.txt'
end

#create_manifestObject



37
38
39
40
# File 'lib/generapp/actions/views.rb', line 37

def create_manifest
  template 'public/manifest.json.erb',
           'public/manifest.json'
end

#create_shared_directoryObject



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

def create_shared_directory
  empty_directory_with_keep_file 'app/views/shared'
end

#create_shared_flashesObject



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

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

#create_shared_headObject



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

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

#create_shared_javascriptsObject



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

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