Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 7782

Show
Ignore:
Timestamp:
10/08/07 00:12:05 (1 year ago)
Author:
bitsweat
Message:

Fix setter action with non-string fields. References #7418.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/in_place_editing/lib/in_place_editing.rb

    r7441 r7782  
    11module InPlaceEditing 
    2    
    32  def self.included(base) 
    43    base.extend(ClassMethods) 
    54  end 
    6    
     5 
    76  # Example: 
    87  # 
     
    2019        @item = object.to_s.camelize.constantize.find(params[:id]) 
    2120        @item.update_attribute(attribute, params[:value]) 
    22         render :text => @item.send(attribute) 
     21        render :text => @item.send(attribute).to_s 
    2322      end 
    2423    end 
    2524  end 
    26    
    27 end   
     25end