started?

started?() Instance Public methods Returns true if the HTTP session has been started. active?

find

find(*args) Instance Public methods Find by id - This can either be a specific id (1), a list of ids (1, 5, 6), or an array of ids ([5, 6, 10]). If no record can be found for all of the listed ids, then RecordNotFound will be raised. If the primary key is an integer, find by id coerces its arguments using to_i. Person.find(1) # returns the object for ID = 1 Person.find("1") # returns the object for ID = 1 Person.find("31-sarah") # returns the object for ID = 31 Pers

beginning_of_week

beginning_of_week(start_day = Date.beginning_of_week) Instance Public methods Returns a new date/time representing the start of this week on the given day. Week is assumed to start on start_day, default is Date.beginning_of_week or config.beginning_of_week when set. DateTime objects have their time set to 0:00. at_beginning_of_week

fatal?

fatal?() Instance Public methods Will the logger output FATAL messages?

render_to_string

render_to_string(*) Instance Public methods Overwrite #render_to_string because body can now be set to a rack body.

update

update(id, attributes) Instance Public methods Updates an object (or multiple objects) and saves it to the database, if validations pass. The resulting object is returned whether the object was saved successfully to the database or not. Parameters id - This should be the id or an array of ids to be updated. attributes - This should be a hash of attributes or an array of hashes. Examples # Updates one record Person.update(15, user_name: 'Samuel', group: 'expert') # Updates mu

new

new(*sequences) Class Public methods

encrypt

cipher.encrypt â self Instance Public methods Initializes the Cipher for encryption. Make sure to call #encrypt or #decrypt before using any of the following methods: key=, iv=, #random_key, #random_iv, #pkcs5_keyivgen Internally calls EVP_CipherInit_ex(ctx, NULL, NULL, NULL, NULL, 1).

connect

connect(tcp) Instance Public methods Connect to IO tcp, with context of the current certificate configuration

find

find(*args, &block) Instance Public methods Finds an object in the collection responding to the id. Uses the same rules as ActiveRecord::Base.find. Returns ActiveRecord::RecordNotFound error if the object cannot be found. class Person < ActiveRecord::Base has_many :pets end person.pets # => [ # #<Pet id: 1, name: "Fancy-Fancy", person_id: 1>, # #<Pet id: 2, name: "Spook", person_id: 1>, # #<Pet id: 3, name: "Choo-Choo", person_id: 1>