Class: Simbiotes::ViewGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/simbiotes/view/view_generator.rb

Instance Method Summary collapse

Instance Method Details

#copy_scaffold_filesObject



6
7
8
9
10
11
12
13
# File 'lib/generators/simbiotes/view/view_generator.rb', line 6

def copy_scaffold_files
  @models = Simbiotes.configuration.targets[module_name.to_s]
  template "show.html.erb", "app/views/#{module_file_name}/#{module_file_name.pluralize}/show.html.erb"
  template "edit.html.erb", "app/views/#{module_file_name}/#{module_file_name.pluralize}/edit.html.erb"
  template "index.html.erb", "app/views/#{module_file_name}/#{module_file_name.pluralize}/index.html.erb"
  template "form.html.erb", "app/views/#{module_file_name}/#{module_file_name.pluralize}/_form.html.erb"
  template "default.css.erb", "app/assets/stylesheets/#{module_file_name}.css"
end