Sha256: a3e9502de376aad16e6adb2d6c28bf5be49b69cf3916e3de3ef55949bfe79130
Contents?: true
Size: 528 Bytes
Versions: 5
Compression:
Stored size: 528 Bytes
Contents
class Puffer::ComponentGenerator < Rails::Generators::NamedBase source_root File.expand_path('../templates', __FILE__) def generate_component @name = name.underscore template 'component.rb', "app/components/#{@name}_component.rb" end def generate_views @name = name.underscore create_file "app/components/#{@name}/index.html.erb", "# I'm index" create_file "app/components/#{@name}/form.html.erb", "# I'm form" create_file "app/components/#{@name}/filter.html.erb", "# I'm filter" end end
Version data entries
5 entries across 5 versions & 1 rubygems