to_xml

to_xml(options = {}, &block) Instance Public methods Builds an XML document to represent the model. Some configuration is available through options. However more complicated cases should override ActiveRecord::Base#to_xml. By default the generated XML document will include the processing instruction and all the object's attributes. For example: <?xml version="1.0" encoding="UTF-8"?> <topic> <title>The First Topic</title> <author-name>David</

except

except(*skips) Instance Public methods Removes from the query the condition(s) specified in skips. Post.order('id asc').except(:order) # discards the order condition Post.where('id > 10').order('id asc').except(:where) # discards the where condition but keeps the order

merge

merge(other) Instance Public methods Merges in the conditions from other, if other is an ActiveRecord::Relation. Returns an array representing the intersection of the resulting records with other, if other is an array. Post.where(published: true).joins(:comments).merge( Comment.where(spam: false) ) # Performs a single join query with both where conditions. recent_posts = Post.order('created_at DESC').first(5) Post.where(published: true).merge(recent_posts) # Returns the intersecti

only

only(*onlies) Instance Public methods Removes any condition from the query other than the one(s) specified in onlies. Post.order('id asc').only(:where) # discards the order condition Post.order('id asc').only(:where, :order) # uses the specified order

new

new(record, attempted_action) Class Public methods

new

new() Class Public methods

execute

execute() Instance Public methods

new

new(message, original_exception = nil) Class Public methods

_store_accessors_module

_store_accessors_module() Instance Public methods

store

store(store_attribute, options = {}) Instance Public methods