Flowdock
method

schema=

Importance_1
Ruby on Rails latest stable (v4.1.8) - 0 notes - Class: ActiveResource::Base

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v3.2.13) is shown here.

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.