class Apiotics::ViewGenerator

Public Instance Methods

copy_scaffold_files() click to toggle source
# File lib/generators/apiotics/view/view_generator.rb, line 6
def copy_scaffold_files
  @models = Apiotics.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

Private Instance Methods

module_file_name() click to toggle source
# File lib/generators/apiotics/view/view_generator.rb, line 17
def module_file_name
  parent.underscore
end
module_name() click to toggle source
# File lib/generators/apiotics/view/view_generator.rb, line 21
def module_name
  parent.classify
end