parse

parse(str) Class Public methods Parses the received response and separates the reply code and the human readable reply text

alias_delete 2

alias_delete(slave, cmd_name) Instance Public methods

new

new(path = nil, type = nil) Class Public methods Creates a new Store of type that will load or save to path

validates_presence_of

validates_presence_of(*attr_names) Instance Public methods Validates that the specified attributes are not blank (as defined by Object#blank?). Happens by default on save. class Person < ActiveRecord::Base validates_presence_of :first_name end The first_name attribute must be in the object and it cannot be blank. If you want to validate the presence of a boolean field (where the real values are true and false), you will want to use validates_inclusion_of :field_name, in: [tru

decode_www_form

decode_www_form(str, enc=Encoding::UTF_8) Class Public methods Decode URL-encoded form data from given str. This decodes application/x-www-form-urlencoded data and returns array of key-value array. This internally uses ::decode_www_form_component. charset hack is not supported now because the mapping from given charset to Ruby's encoding is not clear yet. see also www.w3.org/TR/html5/syntax.html#character-encodings-0 This refers www.w3.org/TR/html5/forms.html#url-encoded-form-data

quote_string

quote_string(string) Instance Public methods QUOTING ==================================================

touch

touch(name = nil) Instance Public methods Saves the record with the updated_at/on attributes set to the current time. Please note that no validation is performed and only the after_touch, after_commit and after_rollback callbacks are executed. If an attribute name is passed, that attribute is updated along with updated_at/on attributes. product.touch # updates updated_at/on product.touch(:designed_at) # updates the designed_at attribute and updated_at/on If used alon

reset_counters

reset_counters(id, *counters) Instance Public methods Resets one or more counter caches to their correct value using an SQL count query. This is useful when adding new counter caches, or if the counter has been corrupted or modified directly by SQL. Parameters id - The id of the object you wish to reset a counter on. counters - One or more association counters to reset Examples # For Post with id #1 records reset the comments_count Post.reset_counters(1, :comments)

request_get

request_get(path, initheader = nil) Instance Public methods Sends a GET request to the path. Returns the response as a Net::HTTPResponse object. When called with a block, passes an HTTPResponse object to the block. The body of the response will not have been read yet; the block can process it using Net::HTTPResponse#read_body, if desired. Returns the response. This method never raises Net::* exceptions. response = http.request_get('/index.html') # The entity body is already read in

locale 2

locale() Instance Public methods