Sha256: d18133d30f8b9b9de03448df3b9491687ecae14eda30348e7d883f9ac9a918cf
Contents?: true
Size: 611 Bytes
Versions: 5
Compression:
Stored size: 611 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" template 'component_spec.rb', "spec/app/components/#{@name}_component_spec.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