Class: Terrazzo::Generators::Views::ShowGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Includes:
PageMappingHelper
Defined in:
lib/generators/terrazzo/views/show_generator.rb

Instance Method Summary collapse

Instance Method Details

#copy_show_templateObject



18
19
20
21
22
23
24
25
26
# File 'lib/generators/terrazzo/views/show_generator.rb', line 18

def copy_show_template
  if resource.present?
    eject_json_props
    copy_file "pages/show.jsx", "app/views/#{namespace_name}/#{resource_path}/show.jsx"
    register_page_mapping("show")
  else
    copy_file "pages/show.jsx", "app/views/#{namespace_name}/application/show.jsx"
  end
end