Sha256: c5428e2a3176529035a3df10839a675ee4f93a1b8c63c5f93275ec20b93dfc46
Contents?: true
Size: 1.22 KB
Versions: 2
Compression:
Stored size: 1.22 KB
Contents
class ControllerGenerator < Rails::Generator::NamedBase #:nodoc: def manifest record do |m| # Check for class naming collisions. m.class_collisions class_path, "#{class_name}Controller", "#{class_name}ControllerTest", "#{class_name}Helper" # Controller, helper, views, and test directories. m.directory File.join('app/controllers', class_path) #m.directory File.join('app/helpers', class_path) #m.directory File.join('app/views', class_path, file_name) #m.directory File.join('test/functional', class_path) # Controller class, functional test, and helper class. m.template 'controller.rb', File.join('app/controllers', class_path, "#{file_name}_controller.rb") # Functional tests are a good idea, but not yet encompassed # m.template 'functional_test.rb', # File.join('test/functional', # class_path, # "#{file_name}_controller_test.rb") # m.template 'helper.rb', # File.join('app/helpers', # class_path, # "#{file_name}_helper.rb") end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
shattered-0.3.3 | lib/rails_generator/generators/components/controller/controller_generator.rb |
shattered-0.3.2 | lib/rails_generator/generators/components/controller/controller_generator.rb |