singular(record_or_class) Class Public methods Returns the singular class name of a record or class. ActiveModel::Naming.singular(post) # => "post" ActiveModel::Naming.singular(Highrise::Person) # => "highrise_person"
reset_sequence!(table, column, sequence = nil) Instance Public methods Set the sequence to the max value of the table's column.
new(errors) Class Public methods
test() Instance Public methods
read(key) Instance Public methods
new(app) Class Public methods Also aliased as: build
render_collection() Instance Public methods
datetime_select(method, options = {}, html_options = {}) Instance Public methods Wraps ActionView::Helpers::DateHelper#datetime_select for form builders: <%= form_for @person do |f| %> <%= f.datetime_select :last_request_at %> <%= f.submit %> <% end %> Please refer to the documentation of the base helper for details.
encode(value, options = nil) Class Public methods Dumps objects in JSON (JavaScript Object Notation). See www.json.org for more info. ActiveSupport::JSON.encode({ team: 'rails', players: '36' }) # => "{\"team\":\"rails\",\"players\":\"36\"}"
[]=(attr_name, value) Instance Public methods Updates the attribute identified by attr_name with the specified value. (Alias for the protected write_attribute method). class Person < ActiveRecord::Base end person = Person.new person[:age] = '22' person[:age] # => 22 person[:age] # => Fixnum
Page 65 of 2275