class method self.new

Ruby on Rails 3.1.12

Since v3.0.20 Last seen in v3.2.22.5

Available in: v3.0.20 v3.1.12 v3.2.22.5

Signature

self.new(name, type)

No documentation comment.

Parameters

name req
type req
Source
# File railties/lib/rails/generators/generated_attribute.rb, line 9
      def initialize(name, type)
        raise Thor::Error, "Missing type for attribute '#{name}'.\nExample: '#{name}:string' where string is the type." if type.blank?
        @name, @type = name, type.to_sym
      end

Defined in railties/lib/rails/generators/generated_attribute.rb line 9 · View on GitHub · Improve this page · Find usages on GitHub

Defined in Rails::Generators::GeneratedAttribute

Type at least 2 characters to search.

↑↓ navigate · open · esc close