Sha256: 7644ff5c4ea444629e29cedfc25be0394b197fff09f6ba7f5ecd0e87df6a3e69

Contents?: true

Size: 313 Bytes

Versions: 14

Compression:

Stored size: 313 Bytes

Contents

class SettingsonGenerator < Rails::Generators::NamedBase
  desc "This generator creates a model and his migration"
  def create_migration
    generate(:model, "#{name.camelize} name:string value:text")
    inject_into_class "app/models/#{name.downcase}.rb", name.camelize, "\tinclude Settingson::Base\n"
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
settingson-1.2.3 lib/generators/settingson/settingson_generator.rb
settingson-1.2.2 lib/generators/settingson/settingson_generator.rb
settingson-1.2.1 lib/generators/settingson/settingson_generator.rb
settingson-1.1.17 lib/generators/settingson/settingson_generator.rb
settingson-1.1.15 lib/generators/settingson/settingson_generator.rb
settingson-1.1.14 lib/generators/settingson/settingson_generator.rb
settingson-1.1.11 lib/generators/settingson/settingson_generator.rb
settingson-1.1.10 lib/generators/settingson/settingson_generator.rb
settingson-1.1.9 lib/generators/settingson/settingson_generator.rb
settingson-1.0.0 lib/generators/settingson/settingson_generator.rb
settingson-0.1.6 lib/generators/settingson/settingson_generator.rb
settingson-0.1.1 lib/generators/settingson/settingson_generator.rb
settingson-0.1.0 lib/generators/settingson/settingson_generator.rb
settingson-0.0.15 lib/generators/settingson/settingson_generator.rb