Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

tankwanghow's latest activity

Friday, February 18 2011
2357 Predictable Table Aliases in Joins was updated in Ruby on Rails
  • tankwanghow
    tankwanghow commented at 2:12 PM

    Yes Predictable table aliasing in needed in activerecord

Thursday, January 07 2010
3560 accepts_nested_attributes_for with :touch => ture cause ActiveRecord::StaleOb... was updated in Ruby on Rails
  • tankwanghow
    tankwanghow commented at 1:07 AM

    As long as, optimistic locking is working with :touch => true for nested_attributes I don't worry about the lock_version number.

    So the new rails 2-3-stable WOR...

Sunday, January 03 2010
3560 accepts_nested_attributes_for with :touch => ture cause ActiveRecord::StaleOb... was updated in Ruby on Rails
  • tankwanghow
    • Tag changed from accepts_nested_attributes_for, active_record, locking, optimistic, touch to accepts_nested_attributes_for, active_record, locking, optimistic, patch, touch
    by tankwanghow at 6:09 AM

    Sorry for the delay, hopefully this time, I get it right...

    Sample application opt_lock_nest.zip and the patch fix_nested_opt_lock.diff

    Run the project_spec.rb ...

Saturday, January 02 2010
3560 accepts_nested_attributes_for with :touch => ture cause ActiveRecord::StaleOb... was updated in Ruby on Rails
  • tankwanghow
    tankwanghow commented at 6:50 AM

    I have found a problem with my patch, let me fix the bug and I will send a new patch.

  • tankwanghow
    tankwanghow commented at 2:29 AM

    Thank for your concern on my problem.

    Here is the two rails application opt_lock_nest_problem.tar.gz and opt_lock_nest_solution.tar.gz

    In order for the solution...

Sunday, December 13 2009
3560 accepts_nested_attributes_for with :touch => ture cause ActiveRecord::StaleOb... was updated in Ruby on Rails
  • tankwanghow
    • Tag changed from accepts_nested_attributes_for, active_record, touch to accepts_nested_attributes_for, active_record, locking, optimistic, touch
    by tankwanghow at 7:16 AM
  • tankwanghow
    tankwanghow commented at 7:12 AM

    Sorry, I have submitted the wrong patch.

    This is the correct one.

    Please Review, I think this feature is very useful for optimistic locking in nested_attributes...

Saturday, December 12 2009
3560 accepts_nested_attributes_for with :touch => ture cause ActiveRecord::StaleOb... was updated in Ruby on Rails
  • tankwanghow
    tankwanghow commented at 6:28 PM

    the belongs_to :invoice, :touch => true can still be use.

  • tankwanghow
    tankwanghow commented at 6:25 PM

    Using UVSoft timestamp.rb patch, I have added a feature in accepts_nested_attributes_for method in nested_attribute.rb, which will add an attr_accessor :silent ...

Friday, December 11 2009
3560 accepts_nested_attributes_for with :touch => ture cause ActiveRecord::StaleOb... was updated in Ruby on Rails
  • tankwanghow
    tankwanghow commented at 2:54 AM

    Sorry about the formatting, this is better.

    class Invoice < ActiveRecord::Base
      has_many :line_items 
      accepts_nested_attributes_for :line_items 
    end
    
    class ...