Sha256: a4989012a863467935cddc46c2976ecf433fbf55db87f1912bb5b0a7aa898936
Contents?: true
Size: 463 Bytes
Versions: 33
Compression:
Stored size: 463 Bytes
Contents
module PushType class StructureGenerator < Rails::Generators::NamedBase source_root File.expand_path('../templates', __FILE__) argument :attributes, type: :array, default: [], banner: "field:type field:type" def create_model template 'structure.rb', "app/models/#{ file_name }.rb" end hook_for :test_framework, as: :model protected def attribute_as_field(att) "field :#{ att.name }, :#{ att.type }" end end end
Version data entries
33 entries across 33 versions & 1 rubygems