method

schema=

Importance_1
v3.2.13 - Show latest stable - 0 notes - 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.

Show source
Register or log in to add new notes.