obj.attribute
On bind, performs the binding routine using adapter.read
on the attribute if preloadData is set to true. Then calls adapter.subscribe
on the attribute.
obj:property
.done { | |
opacity: 0.5; | |
text-decoration: line-through; | |
} |
rivets.configure({ | |
adapter: { | |
subscribe: function(obj, keypath, callback) { | |
obj.on("change:" + keypath, callback); | |
}, | |
unsubscribe: function(obj, keypath, callback) { | |
obj.off("change:" + keypath, callback); | |
}, |
" GENERAL | |
:set ruler | |
:set number | |
:set noswapfile | |
syntax on | |
colorscheme mr | |
" INDENTATION |
class Riak | |
include HTTParty | |
format :json | |
def self.config(host, port, prefix='riak') | |
base_uri "#{host}:#{port}/#{prefix}" | |
end | |
end |
# MongoMapper::Document::InstanceMethods | |
def to_model | |
errors.instance_eval do | |
def [](attribute) | |
return [] if errors[attribute.to_sym].nil? | |
errors[attribute.to_sym] | |
end | |
end | |
self |