Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on May 24, 2011
  1. @tenderlove
Commits on Nov 28, 2010
  1. @spastorino

    Revert f1c13b0

    spastorino authored
Commits on Nov 9, 2010
  1. @spastorino
  2. @spastorino
  3. @dchelimsky @spastorino

    use persisted? instead of new_record? wherever possible

    dchelimsky authored spastorino committed
    - persisted? is the API defined in ActiveModel
    - makes it easier for extension libraries to conform to ActiveModel
      APIs
      without concern for whether the extended object is specifically
      ActiveRecord
    
    [#5927 state:committed]
    
    Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
Commits on Sep 24, 2010
  1. @tnp @josevalim

    restore behavior of touch for models without :updated_xx [#5439 state…

    tnp authored josevalim committed
    …:resolved]
    
    Signed-off-by: José Valim <jose.valim@gmail.com>
Commits on Aug 24, 2010
  1. @fxn

    edit pass to a recent doc patch

    fxn authored
  2. @neerajdotname @fxn

    touch operationg if used along with belongs_to will also be invoked o…

    neerajdotname authored fxn committed
    …n associated objects
  3. @neerajdotname @josevalim

    @user.touch should not fail if User does not have updated_at/updated_…

    neerajdotname authored josevalim committed
    …on column.
    
    [#5439 state:resolved]
    
    Signed-off-by: José Valim <jose.valim@gmail.com>
Commits on Aug 12, 2010
  1. @josevalim

    Make update_attribute behave as in Rails 2.3 and document the behavio…

    josevalim authored
    …r intrinsic to its implementation.
Commits on Aug 4, 2010
  1. @fxn
Commits on Aug 3, 2010
  1. @fxn
Commits on Aug 2, 2010
  1. @neerajdotname
  2. @josevalim
Commits on Jul 28, 2010
  1. @neerajdotname

    adding punctuations

    neerajdotname authored
  2. @neerajdotname
Commits on Jul 27, 2010
  1. @neerajdotname
Commits on Jul 21, 2010
  1. @neerajdotname @fxn

    expanded comment for update_attribute method

    neerajdotname authored fxn committed
  2. @neerajdotname @josevalim

    update_attribute should not update readonly attributes

    neerajdotname authored josevalim committed
    [#5106 state:resolved]
    
    Signed-off-by: José Valim <jose.valim@gmail.com>
Commits on Jul 14, 2010
  1. @fxn

    revises the rdoc of update_attributes and update_attributes! to docum…

    fxn authored
    …ent they are wrapped in a transaction, and adds code comments explaining why
Commits on Jul 13, 2010
  1. @neerajdotname @josevalim

    update_attributes and update_attributes! are now wrapped in a transac…

    neerajdotname authored josevalim committed
    …tion
    
    [#922 state:resovled]
    
    Signed-off-by: José Valim <jose.valim@gmail.com>
  2. @josevalim
  3. @neerajdotname @josevalim

    with this fix touch method - does not call validations - doest not ca…

    neerajdotname authored josevalim committed
    …ll callbacks - updates updated_at/on along with attribute if attribute is provided - marks udpated_at/on and attribute as NOT changed
    
    [#2520 state:resolved]
    
    Signed-off-by: José Valim <jose.valim@gmail.com>
Commits on Jul 8, 2010
  1. @josevalim
  2. @neerajdotname @josevalim

    This patch changes update_attribute implementatino so:

    neerajdotname authored josevalim committed
    - it will only save the attribute it has been asked to save and not all dirty attributes
    
    - it does not invoke callbacks
    
    - it does change updated_at/on
    
    Signed-off-by: José Valim <jose.valim@gmail.com>
Commits on Jun 29, 2010
  1. @josevalim

    Add scoping and unscoped as the syntax to replace the old with_scope …

    josevalim authored
    …and with_exclusive_scope. A few examples:
    
    * with_scope now should be scoping:
    
    Before:
    
      Comment.with_scope(:find => { :conditions => { :post_id => 1 } }) do
        Comment.first #=> SELECT * FROM comments WHERE post_id = 1
      end
    
    After:
    
      Comment.where(:post_id => 1).scoping do
        Comment.first #=> SELECT * FROM comments WHERE post_id = 1
      end
    
    * with_exclusive_scope now should be unscoped:
    
      class Post < ActiveRecord::Base
        default_scope :published => true
      end
    
      Post.all #=> SELECT * FROM posts WHERE published = true
    
    Before:
    
      Post.with_exclusive_scope do
        Post.all #=> SELECT * FROM posts
      end
    
    After:
    
      Post.unscoped do
        Post.all #=> SELECT * FROM posts
      end
    
    Notice you can also use unscoped without a block and it will return an anonymous scope with default_scope values:
    
      Post.unscoped.all #=> SELECT * FROM posts
Commits on Jun 16, 2010
  1. @rizwanreza
Commits on May 8, 2010
  1. @wycats
Something went wrong with that request. Please try again.