instance method
create_generated_attribute
Ruby on Rails 3.0.20
Since v3.0.20 Last seen in v3.2.22.5Signature
create_generated_attribute(attribute_type, name = 'test')
Create a Rails::Generators::GeneratedAttribute by supplying the attribute type and, optionally, the attribute name:
create_generated_attribute(:string, 'name')
Parameters
-
attribute_typereq -
nameopt = 'test'
Source
# File railties/lib/rails/generators/test_case.rb, line 239
def create_generated_attribute(attribute_type, name = 'test')
Rails::Generators::GeneratedAttribute.new(name, attribute_type.to_s)
end
Defined in railties/lib/rails/generators/test_case.rb line 239
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Rails::Generators::TestCase