Ticket #8051: macros_in_place_editing.patch
| File macros_in_place_editing.patch, 0.5 kB (added by luminousbit, 1 year ago) |
|---|
-
in_place_editing.rb
old new 24 24 define_method("set_#{object}_#{attribute}") do 25 25 @item = object.to_s.camelize.constantize.find(params[:id]) 26 26 @item.update_attribute(attribute, params[:value]) 27 render :text => @item.send(attribute) 27 render :text => @item.send(attribute) || '' 28 28 end 29 29 end 30 30 end