Method: Rails::Generators::GeneratedAttribute#initialize
- Defined in:
- railties/lib/rails/generators/generated_attribute.rb
#initialize(name, type = nil, index_type = false, attr_options = {}) ⇒ GeneratedAttribute
Returns a new instance of GeneratedAttribute.
109 110 111 112 113 114 115 |
# File 'railties/lib/rails/generators/generated_attribute.rb', line 109 def initialize(name, type = nil, index_type = false, = {}) @name = name @type = type || :string @has_index = INDEX_OPTIONS.include?(index_type) @has_uniq_index = UNIQ_INDEX_OPTIONS.include?(index_type) = end |