aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | | correct bad jquery syntaxThiago Pinto2012-12-061-2/+2
| | | | | | |
| * | | | | | Introduce Bundler and Gemfiles in a NOTEPablo Torres2012-12-051-0/+2
| | | | | | |
| * | | | | | Define a generator before referring to itPablo Torres2012-12-041-1/+1
| | | | | | |
| * | | | | | Correct bad EnglishPablo Torres2012-12-041-2/+2
| | | | | | |
| * | | | | | Merge pull request #120 from tonytonyjan/patch簡煒航2012-12-041-1/+18
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | add a notice about loading assets in production mode
| | * | | | | | add a notice about loading assets in production modeTony Jian2012-12-051-1/+18
| |/ / / / / /
* | | | | | | Fix scaffold controller generator testsCarlos Antonio da Silva2012-12-081-8/+6
| | | | | | |
* | | | | | | Improve where.not docs [ci skip]Carlos Antonio da Silva2012-12-081-14/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix example queries * Remove doc entries of where.like/not_like. * Remove :chain from where.not related docs. To me that's an implementation detail and we don't expect people to use where(:chain).not.
* | | | | | | Merge pull request #8461 from frodsan/fix_assert_method_generatorsCarlos Antonio da Silva2012-12-081-1/+1
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Fix #assert_instance_method to also assert indented methods
| * | | | | | | Fix #assert_instance_method to also assert indented methodsFrancesco Rodriguez2012-12-081-1/+1
| | | | | | | |
* | | | | | | | Merge pull request #8465 from frodsan/update_am_action_callbacksRafael Mendonça França2012-12-085-19/+19
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | use _action callbacks in actionmailer
| * | | | | | | | use _action callbacks in actionmailerFrancesco Rodriguez2012-12-085-19/+19
|/ / / / / / / /
* | | | | | | | Merge pull request #8395 from bmaland/attr_accessorsCarlos Antonio da Silva2012-12-081-23/+1
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Use attr_accessor for Rails.{application,cache,logger}
| * | | | | | | | Use attr_accessor for Rails.{application,cache,logger}Bjørn Arild Mæland2012-12-011-23/+1
| | | | | | | | |
* | | | | | | | | Merge pull request #8457 from caike/masterCarlos Antonio da Silva2012-12-081-4/+4
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update AR Changelog with correct example using includes [ci skip]
| * | | | | | | | | Update AR Changelog with correct example using includesCaike Souza2012-12-081-4/+4
| | |/ / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | These queries don't seem to work without the includes clause. [ci skip]
* | | | | | | | | Merge pull request #8462 from frodsan/update_guides_action_callbacksCarlos Antonio da Silva2012-12-086-21/+21
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Update guides to use _action callbacks [ci skip]
| * | | | | | | | | update guides to use _action callbacks [ci skip]Francesco Rodriguez2012-12-076-21/+21
| |/ / / / / / / /
* | | | | | | | | Merge pull request #8459 from frodsan/explicit!Carlos Antonio da Silva2012-12-082-19/+14
|\ \ \ \ \ \ \ \ \ | |/ / / / / / / / |/| | | | | | | | use :only instead of :except callback option in the controller template
| * | | | | | | | fix scaffold controller generator testsFrancesco Rodriguez2012-12-071-16/+12
| | | | | | | | |
| * | | | | | | | use :only instead of :except callback option in the controller templateFrancesco Rodriguez2012-12-071-3/+2
|/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As [Security Guide](http://edgeguides.rubyonrails.org/security.html#whitelists-versus-blacklists) says, it's better to use `before_filter only: []` instead of `except: []` so we don't forget to turn the filter off for newly added actions.
* | | | | | | | Merge pull request #8456 from frodsan/actionize2Xavier Noria2012-12-075-32/+76
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Actionize2
| * | | | | | | | add tests to aliased _filter callbacksFrancesco Rodriguez2012-12-071-0/+46
| | | | | | | | |
| * | | | | | | | use `_action` instead of `_filter` callbacksFrancesco Rodriguez2012-12-075-34/+32
|/ / / / / / / /
* | | | | | | | Merge pull request #8455 from frodsan/actionizeXavier Noria2012-12-0714-28/+28
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Actionize: Use `_action` callbacks in documentation and code
| * | | | | | | | update documentation and code to use _action callbacksFrancesco Rodriguez2012-12-0713-25/+25
| | | | | | | | |
| * | | | | | | | fix prepend_before_filter documentation [ci skip]Francesco Rodriguez2012-12-071-3/+3
| | | | | | | | |
* | | | | | | | | Merge pull request #8454 from frodsan/deprecate_as_basic_objectJeremy Kemper2012-12-076-15/+29
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Rename ActiveSupport::BasicObject to ActiveSupport::ProxyObject
| * | | | | | | | | Rename ActiveSupport::BasicObject to ActiveSupport::ProxyObjectFrancesco Rodriguez2012-12-076-15/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AS::BasicObject is used for proxy classes. Let's give it a less concerning name. Also, it avoids the confusion with Ruby's Basic Object.
* | | | | | | | | | Let the scaffold example use the "set shared record" pattern to explain ↵David Heinemeier Hansson2012-12-071-6/+7
| |/ / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | callbacks
* | | | | | | | | Rollback where.like and where.not_likeCarlos Antonio da Silva2012-12-073-46/+4
|/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The real win with these chain methods is where.not, that takes care of different scenarios in a graceful way, for instance when the given value is nil. where("author.id != ?", author_to_ignore.id) where.not("author.id", author_to_ignore.id) Both where.like and where.not_like compared to the SQL versions doesn't seem to give us that much: Post.where("title LIKE 'ruby on%'") Post.where.like(title: 'ruby on%'") Post.where("title NOT LIKE 'ruby on%'") Post.where.not_like(title: 'ruby on%'") Thus Rails is adding where.not, but not where.like/not_like and others.
* | | | | | | | Fix READMEDavid Heinemeier Hansson2012-12-071-1/+1
| | | | | | | |
* | | | | | | | Rename all action callbacks from *_filter to *_actionDavid Heinemeier Hansson2012-12-073-69/+118
| | | | | | | |
* | | | | | | | Merge pull request #8452 from claudiob/explain_where_chain_parametersCarlos Antonio da Silva2012-12-072-2/+23
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Document the types of arguments accepted by AR#not
| * | | | | | | | Document the types of arguments accepted by AR#notclaudiob2012-12-072-2/+23
|/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit stems from https://github.com/rails/rails/pull/8332#issuecomment-11127957 Since the formats in which conditions can be passed to `not` differ from the formats in which conditions can be passed to `like` and `not_like`, then I think it's worth adding rdoc and tests to show this behavior
* | | | | | | | revises a RDoc example to make it idiomaticXavier Noria2012-12-071-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The force flag suggests the original was probably copied from some db/schema.rb. Thanks to Josh Susser for spotting and reporting this.
* | | | | | | | let @version be always externally set in guides generation [fixes #8221]Xavier Noria2012-12-072-2/+2
| |_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Shelling out was there for authors convenience, but we are rather going to have the tag or SHA1 always in RAILS_VERSION and if the environment variable is blank, then just use "local" as a reminder that you are just working locally. The docs server has been updated to set the long SHA1 in RAILS_VERSION when generating edge guides.
* | | | | | | Fix where.not with in clauseCarlos Antonio da Silva2012-12-072-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Arel::Nodes::In inherits from Arel::Nodes::Equality, so the case statement was always using the Equality operator for both scenarios, resulting in a not equal query instead.
* | | | | | | Merge pull request #8445 from claudiob/match_rdoc_with_6ba0f97Carlos Antonio da Silva2012-12-071-4/+4
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Update #where rdoc to match 6ba0f97 [ci skip]
| * | | | | | | Update #where rdoc to match 6ba0f97 [ci skip]claudiob2012-12-071-4/+4
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit updates the rdoc of AR#where to match the changes applied in https://github.com/rails/rails/commit/6ba0f97 that is: * `where(nil)` has the same effect of `where('')`: a no op * `where` (no args) has the same effect of `where(:chain)`: to create a WhereChain
* | | | | | | Revert "Invert precedence of content in ActionDispatch::Static"Andrew White2012-12-074-51/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit c59734f756b79c39486c45273d2cc5d42cd0c864.
* | | | | | | Move where with blank conditions test to the correct where tests fileCarlos Antonio da Silva2012-12-072-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This test does not belong to has many associations test.
* | | | | | | Ensure there won't be any regression with where(nil) callsCarlos Antonio da Silva2012-12-072-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Consider this scenario: if params[:foo] conditions = { foo: true } end foos = Foo.where(conditions).order(:id) When params[:foo] is nil, this would call: foos = Foo.where(nil).order(:id) In this scenario, we want Foo.where(conditions) to be the same as calling Foo.all, otherwise we'd get a "NoMethodError order for WhereChain". Related to #8332.
* | | | | | | Merge pull request #8332 from amatsuda/ar_where_chainCarlos Antonio da Silva2012-12-075-8/+200
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Relation.where with no args can be chained with not, like, and not_like Conflicts: activerecord/CHANGELOG.md activerecord/lib/active_record/relation/query_methods.rb
| * | | | | | | Relation.where with no args can be chained with not, like, and not_likeAkira Matsuda2012-11-305-8/+198
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | examples: Model.where.not field: nil #=> "SELECT * FROM models WHERE field IS NOT NULL Model.where.like name: 'Jeremy%' #=> "SELECT * FROM models WHERE name LIKE 'Jeremy%' this feature was originally suggested by Jeremy Kemper https://github.com/rails/rails/pull/5950#issuecomment-5591330 Closes #5950
* | | | | | | | Stop shelling out more than necessaryCarlos Antonio da Silva2012-12-071-10/+10
| | | | | | | |
* | | | | | | | Unscope update_column(s) query to ignore default scopeCarlos Antonio da Silva2012-12-063-1/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When applying default_scope to a class with a where clause, using update_column(s) could generate a query that would not properly update the record due to the where clause from the default_scope being applied to the update query. class User < ActiveRecord::Base default_scope where(active: true) end user = User.first user.active = false user.save! user.update_column(:active, true) # => false In this situation we want to skip the default_scope clause and just update the record based on the primary key. With this change: user.update_column(:active, true) # => true Fixes #8436.
* | | | | | | | Improve AR changelogCarlos Antonio da Silva2012-12-061-18/+17
| | | | | | | |
* | | | | | | | Remove method redefined warningsCarlos Antonio da Silva2012-12-061-1/+1
| | | | | | | |
* | | | | | | | Use CURRENT_TIMESTAMP since it has apparently better cross db supportCarlos Antonio da Silva2012-12-062-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LOCALTIMESTAMP is not support by sqlite3, and travis was giving us these errors: https://travis-ci.org/rails/rails/jobs/3535241/#L570