Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Nov 9, 2010
  1. Santiago Pastorino
  2. Santiago Pastorino
  3. David Chelimsky Santiago Pastorino

    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 José Valim

    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. Xavier Noria

    edit pass to a recent doc patch

    fxn authored
  2. Neeraj Singh Xavier Noria

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

    neerajdotname authored fxn committed
    …n associated objects
  3. Neeraj Singh José Valim

    @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. José Valim

    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. Xavier Noria
Commits on Aug 3, 2010
  1. Xavier Noria
Commits on Aug 2, 2010
  1. Neeraj Singh
  2. José Valim
Commits on Jul 28, 2010
  1. Neeraj Singh

    adding punctuations

    neerajdotname authored
  2. Neeraj Singh
Commits on Jul 27, 2010
  1. Neeraj Singh
Commits on Jul 21, 2010
  1. Neeraj Singh Xavier Noria

    expanded comment for update_attribute method

    neerajdotname authored fxn committed
  2. Neeraj Singh José Valim

    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. Xavier Noria

    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. Neeraj Singh José Valim

    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. José Valim
  3. Neeraj Singh José Valim

    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. José Valim
  2. Neeraj Singh José Valim

    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. José Valim

    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. Rizwan Reza
Commits on May 8, 2010
  1. Yehuda Katz
Something went wrong with that request. Please try again.