new

new(arguments = ARGV) Class Public methods

change

change(options) Instance Public methods Returns a new DateTime where one or more of the elements have been changed according to the options parameter. The time options (:hour, :min, :sec) reset cascadingly, so if only the hour is passed, then minute and sec is set to 0. If the hour and minute is passed, then sec is set to 0. The options parameter takes a hash with any of these keys: :year, :month, :day, :hour, :min, :sec, :offset, :start. DateTime.new(2012, 8, 29, 22, 35, 0).change

rollback_db_transaction

rollback_db_transaction() Instance Public methods Rolls back the transaction (and turns on auto-committing). Must be done if the transaction block raises an exception or returns false.

cache_for_connection

cache_for_connection(connection) Class Public methods

datetime_local_field_tag

datetime_local_field_tag(name, value = nil, options = {}) Instance Public methods Creates a text field of type âdatetime-localâ. Options :min - The minimum acceptable value. :max - The maximum acceptable value. :step - The acceptable value granularity. Otherwise accepts the same options as text_field_tag.

store

store(key, value) Instance Public methods Alias for: []=

delete_matched

delete_matched(matcher, options = nil) Instance Public methods

authenticate

authenticate(controller, &login_procedure) Instance Public methods If token Authorization header is present, call the login procedure with the present token and options. controller ActionController::Base instance for the current request. login_procedure Proc to call if a token is present. The Proc should take two arguments: authenticate(controller) { |token, options| ... } Returns the return value of login_procedure if a token is found. Returns nil if no token is found

post

post(*args, &block) Instance Public methods Define a route that only recognizes HTTP POST. For supported arguments, see match post 'bacon', to: 'food#bacon'

to_s

to_s() Instance Public methods