Sha256: 29b70faa2897feff487f0f5d83ef1b8dee983c24ae430bdb253a8253cd5d4de4
Contents?: true
Size: 497 Bytes
Versions: 1
Compression:
Stored size: 497 Bytes
Contents
module Dash class ResourceGenerator < Rails::Generators::NamedBase source_root File.expand_path('../templates', __FILE__) def add_route route "namespace :dash do resources :#{table_name} end" end def create_templates template 'resource.erb', "app/controllers/dash/#{table_name}_controller.rb" template 'form.erb', "app/views/dash/#{table_name}/form.html.haml" template 'index.erb', "app/views/dash/#{table_name}/index.html.haml" end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rails_dash-0.0.1 | lib/generators/dash/resource_generator.rb |