method
schema=
v3.1.0 -
Show latest stable
- Class:
ActiveResource::Base
schema=(the_schema)public
Alternative, direct way to specify a schema for this Resource. schema is more flexible, but this is quick for a very simple schema.
Pass the schema as a hash with the keys being the attribute-names and the value being one of the accepted attribute types (as defined in schema)
example:
class Person < ActiveResource::Base
schema = {'name' => :string, 'age' => :integer }
end
The keys/values can be strings or symbols. They will be converted to strings.