apidock.com Archives - 16 April 2014, Wednesday

  • destroyed? (ActiveRecord::Persistence)

    apidock.com 16 Apr '14, 4am

    Returns true if this object has been destroyed, otherwise returns false. Show source # File activerecord/lib/active_record/persistence.rb, line 77 def destroyed? sync_with_transaction_state @destroyed end

  • to_query (ActiveSupport::CoreExtensions::Hash)

    apidock.com 11 Apr '14, 9am

    This method is deprecated or moved on the latest stable version. The last existing version (v2.3.8) is shown here. These similar methods exist in v4.0.2: Object#to_query Array#to_query Hash#to_query

  • __callee__ (Kernel)

    apidock.com 08 Apr '14, 11am

    __callee__ and __method__ both return symbol when originally defined, not current There has been some indication that __callee__ is intended to return the symbol with which the method was actually invoked, whereas __method__ returns name with which the method was originally defined, b...

  • create (ActiveRecord::Base)

    apidock.com 04 Apr '14, 8pm

    This method is deprecated or moved on the latest stable version. The last existing version (v3.1.0) is shown here. These similar methods exist in v4.0.2: ActiveRecord::Relation#create ActiveRecord::ConnectionAdapters::MysqlAdapter#create ActiveSupport::TimeZone#create ActiveRecord::As...

  • size (Fixnum)

    apidock.com 24 Mar '14, 8pm

    in the machine representation of a

  • attr_accessor (Module)

    apidock.com 18 Mar '14, 12pm

    Defines a named attribute for this module, where the name is symbol. id2name, creating an instance variable (@name ) and a corresponding access method to read it. Also creates a method called name= to set the attribute.

  • strftime (DateTime)

    apidock.com 08 Mar '14, 12pm

    m blank-padded ( 1..12) %-m no-padded (1..12) %B - The full month name (``January'') %^B uppercased (``JANUARY'') %b - The abbreviated month name (``Jan'') %^b uppercased (``JAN'') %h - Equivalent to %b %d - Day of the month, zero-padded (01..31) %-d no-padded (1..31) %e - Day of the ...

  • ERB

    apidock.com 06 Mar '14, 1pm

    ) returns a string in the same character encoding as the input string. When the input string has a magic comment, however, it returns a string in the encoding specified by the magic comment.

  • find_in_batches (ActiveRecord::Batches)

    apidock.com 03 Mar '14, 10am

    You can control the starting point for the batch processing by supplying the :start option. This is especially useful if you want multiple workers dealing with the same processing queue. You can make worker 1 handle all the records between id 0 and 10,000 and worker 2 handle from 10,0...

  • touch (ActiveRecord::Persistence)

    apidock.com 27 Feb '14, 7pm

    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 callback is executed. If an attribute name is passed, that attribute is updated along with updated_at/on attributes.

  • current_time_from_proper_timezone (ActiveRecord::Timestamp)

    apidock.com 27 Feb '14, 7pm

    current_time_from_proper_timezone () private No documentation This method has no description. You can help the Ruby on Rails community by adding new notes. Hide source # File activerecord/lib/active_record/timestamp.rb, line 107 def current_time_from_proper_timezone self . class . def...

  • authenticate_or_request_with_http_token (ActionController::HttpAuthentication::Token::ControllerMethods)

    apidock.com 21 Feb '14, 11pm

    authenticate_or_request_with_http_token (realm = "Application", &login_procedure) public No documentation This method has no description. You can help the Ruby on Rails community by adding new notes. Show source # File actionpack/lib/action_controller/metal/http_authentication.rb, lin...

  • respond_with (ActionController::MimeResponds)

    apidock.com 17 Feb '14, 1am

    can play two roles. It can be used to generate the redirect url for successful html requests (e.g. for create actions when no template exists), while for formats other than html and javascript it is the object that gets rendered, by being converted directly to the required format (aga...

  • wrap (Array)

    apidock.com 16 Feb '14, 2pm

    If the argument responds to to_ary the method is invoked. Kernel#Array moves on to try to_a if the returned value is nil, but Array.wrap returns nil right away. If the returned value from to_ary is neither nil nor an Array object, Kernel#Array raises an exception, while Array.wrap doe...

  • forty_two (Array)

    apidock.com 11 Feb '14, 4pm

    Equal to self[41] . Also known as accessing “the reddit”. Show source # File activesupport/lib/active_support/core_ext/array/access.rb, line 51 def forty_two self [ 41 ] end

  • Proxy (Net::HTTP)

    apidock.com 09 Feb '14, 10pm

    The arguments are the DNS name or IP address of the proxy host, the port to use to access the proxy, and a username and password if authorization is required to use the proxy.

  • assign_attributes (ActiveRecord::Base)

    apidock.com 07 Feb '14, 10am

    This method is deprecated or moved on the latest stable version. The last existing version (v3.1.0) is shown here. These similar methods exist in v4.0.2: ActiveRecord::AttributeAssignment#assign_attributes

  • reset_pk_sequence! (ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::SchemaStatements)

    apidock.com 05 Feb '14, 5pm

    reset_pk_sequence! (table, pk = nil, sequence = nil) public Resets the sequence of a table’s primary key to the maximum value. Show source # File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 279 def reset_pk_sequence! ( table , pk = nil , se...

  • truncate (String)

    apidock.com 03 Feb '14, 3pm

    Truncates a given text after a given length if text is longer than length: ' Once upon a time in a world far far away '. truncate ( 27 ) # => "Once upon a time in a wo..." Pass a string or regexp :separator to truncate text at a natural break: ' Once upon a time in a world far far awa...

  • to_prepare (ActionDispatch::Reloader)

    apidock.com 29 Jan '14, 12am

    Add a prepare callback. Prepare callbacks are run before each request, prior to ActionDispatch::Callback’s before callbacks. Show source # File actionpack/lib/action_dispatch/middleware/reloader.rb, line 34 def self.to_prepare (* args , & block ) set_callback ( :prepare , * args , & b...

  • inquiry (String)

    apidock.com 28 Jan '14, 11am

    Wraps the current string in the ActiveSupport::StringInquirer class, which gives you a prettier way to test for equality. env = ' production '. inquiry env . production? # => true env . development? # => false Show source # File activesupport/lib/active_support/core_ext/string/inquiry...

  • to_sentence (Array)

    apidock.com 27 Jan '14, 9pm

    :words_connector - The sign or word used to join the elements in arrays with two or more elements (default: “, ”). :two_words_connector - The sign or word used to join the elements in arrays with two elements (default: “ and ”). :last_word_connector - The sign or word used to join the...

  • has_and_belongs_to_many (ActiveRecord::Associations::ClassMethods)

    apidock.com 26 Jan '14, 11pm

    Specifies a many-to-many relationship with another class. This associates two classes via an intermediate join table. Unless the join table is explicitly specified as an option, it is guessed using the lexical order of the class names. So a join between Developer and Project will give...

    Related:
    1. Sass: Responsive Test sass-lang.com 24 Jan '14, 6pm
  • expire_action (ActionController::Caching::Actions)

    apidock.com 24 Jan '14, 1am

    Method deprecated or moved This method is deprecated or moved on the latest stable version. The last existing version (v3.2.13) is shown here. expire_action (options = {}) protected No documentation This method has no description. You can help the Ruby on Rails community by adding new...

  • check_query (URI::Generic)

    apidock.com 14 Jan '14, 7pm

    check the query v component for RFC2396 compliance and against the URI::Parser Regexp for :QUERY Can not have a opaque component defined, with a query component defined. Show source # File lib/uri/generic.rb, line 882 def check_query ( v ) return v unless v # raise if both hier and op...

  • class_inheritable_accessor (Class)

    apidock.com 10 Jan '14, 3pm

    The key thing to note from post is that class_inheritable_accessor copies the value from the parent class at inherit time. So, if you are setting a default value of an array and doing something like the following you might end up with unintended results:

  • skip_callback (ActiveSupport::Callbacks::ClassMethods)

    apidock.com 10 Jan '14, 11am

    Welcome Register Projects Help About Blog APIdock release: IRON STEVE (1.4) If you have any comments, ideas or feedback, feel free to contact us at APIdock copyright Nodeta Oy 2008-2014 Flowdock - Team Inbox With Chat for Software Developers Check out how the team behind APIdock conne...

  • after_save (ActiveRecord::Callbacks)

    apidock.com 08 Jan '14, 7pm

    Method deprecated or moved This method is deprecated or moved on the latest stable version. The last existing version (v2.3.8) is shown here. after_save () public Is called after Base.save (regardless of whether it’s a create or update save). Note that this callback is still wrapped i...

  • to_sentence (Array)

    apidock.com 02 Jan '14, 11pm

    Converts the array to a comma-separated sentence where the last element is joined by the connector word. Options: :words_connector - The sign or word used to join the elements in arrays with two or more elements (default: “, ”) :two_words_connector - The sign or word used to join the ...

  • Singleton

    apidock.com 26 Dec '13, 12pm

    Making Klass.new and Klass.allocate private. Overriding Klass.inherited(sub_klass) and Klass.clone() to ensure that the Singleton properties are kept when inherited and cloned. Providing the Klass.instance() method that returns the same object each time it is called. Overriding Klass....