Flowdock

Notes posted by Ajedi32

RSS feed
July 16, 2013 - (>= v3.2.1)
0 thanks

Difference between fullpath

From what I’ve seen, it looks like the difference between this and #fullpath is that this method doesn’t include parameters that weren’t in the original url (i.e. parameters that were sent via POST instead of GET).

February 8, 2013 - (>= v2.3.8)
0 thanks

The purpose of this method

This method keeps track of whether a hidden id field needs to be created when the form builder is generating fields for a nested model. It gets set to true by #hidden_field when that method is used to create a field named ‘id’.

Here’s an example of what this can be useful for: http://railsforum.com/viewtopic.php?id=39640

January 26, 2013 - (v3.0.0 - v3.2.8)
0 thanks

Use sqlite3, not sqlite

Note that typically if you want to connect to an SQLite database the adapter would be “sqlite3”; not “sqlite” as depicted in the documentation above. Just using the term “sqlite” might result in the error message: “database configuration specifies nonexistent sqlite adapter”

September 19, 2012 - (v3.1.0 - v3.2.8)
0 thanks

Return value:

The result of this method is a hash of the following form:

{"table_field"=>"table value", "another_field" => 15, ...}

For example:

{"user_id"=>21}
September 5, 2012 - (v3.2.1 - v3.2.8)
1 thank

ActiveModel::MassAssignmentSecurity::Error

Note that in the example shown in the documentation, `user.assign_attributes({ :name => ‘Josh’, :is_admin => true })` would raise a `ActiveModel::MassAssignmentSecurity::Error` and would not actually update user.name, contrary to what the example seems to demonstrate.

August 22, 2012 - (>= v3.0.0)
0 thanks

Rails Guides

There is an excellent guide on the use of this method located here:

http://guides.rubyonrails.org/active_record_querying.html#conditions