I am trying to customise rails default scaffold generators. For views I can do that by simply adding files under : lib/templates/erb/scaffold/
Here I have added index.html.erb and customized, but I want to change model that is generated by this command:
rails g scaffold model
I have tried adding files to lib/templates/rails/model/model_generator.rb
with codes like this :
module Rails
module Generators
class ModelGenerator < NamedBase #metagenerator
argument :attributes, :type => :array, :default => [], :banner => "field[:type][:index] field[:type][:index]"
hook_for :orm, :required => true
end
end
end
But it is doing nothing I need help in this regard what file I need to override and where do I need to place.