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

Ticket #8051: macros_in_place_editing.patch

File macros_in_place_editing.patch, 0.5 kB (added by luminousbit, 1 year ago)

Patch per orangechicken

  • in_place_editing.rb

    old new  
    2424          define_method("set_#{object}_#{attribute}") do 
    2525            @item = object.to_s.camelize.constantize.find(params[:id]) 
    2626            @item.update_attribute(attribute, params[:value]) 
    27             render :text => @item.send(attribute) 
     27            render :text => @item.send(attribute) || '' 
    2828          end 
    2929        end 
    3030      end