Sha256: 86127714bf18999603490a8750d2849bde0e006235f11caa05890a50097a33d4
Contents?: true
Size: 726 Bytes
Versions: 2
Compression:
Stored size: 726 Bytes
Contents
module RaroCrud class BrancoGenerator < Rails::Generators::NamedBase source_root File.expand_path('../templates', __FILE__) attr_reader :teste argument :acao, type: :string, default: [], banner: "action action" def copy_initializer_file @model = Module.const_get(file_name.camelize) @action = acao template 'template.rb', "app/views/#{@model.name.pluralize.underscore.to_sym}/_template.html.erb", @model,@action template 'action.rb', "app/views/#{@model.name.pluralize.underscore.to_sym}/#{@action}.html.erb", @model,@action template 'action_partial.rb', "app/views/#{@model.name.pluralize.underscore.to_sym}/_#{@action}.html.erb", @model,@action end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
raro_generator-0.0.2 | lib/generators/raro_crud/branco/branco_generator.rb |
raro_generator-0.0.1 | lib/generators/raro_crud/branco/branco_generator.rb |