Sha256: 514b18ad7e4b85716944ac632254651a83234c38130e2348094b3605fb2fda6a

Contents?: true

Size: 818 Bytes

Versions: 1

Compression:

Stored size: 818 Bytes

Contents

# use this extended copy of Rails::Generators::ScaffoldGenerator
# since the search path is the following:
# ["scaffold:scaffold", "rails:scaffold", "scaffold"]
# which allows to override orignal generator
# adding a  Rails::Generators::ScaffoldGenerator.hook_for did not work
# since it looses the ORM config somehow
require  'rails/generators/rails/resource/resource_generator'
module Rails
  module Generators
    class ScaffoldGenerator < ResourceGenerator #metagenerator

      remove_hook_for :resource_controller
      remove_class_option :actions
    
      hook_for :scaffold_controller, :required => true, :in => :rails
      hook_for :stylesheets, :in => :rails

      hook_for :ixtlan, :type => :boolean, :default => true do |controller|
        invoke controller, [class_name]
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ixtlan-guard-0.1.0 lib/generators/scaffold/scaffold/scaffold_generator.rb