try overriding it like that (i just took the code from github and
added an if-clause):
def in_place_edit_for(object, attribute, options = {})
define_method("set_#{object}_#{attribute}") do
@item = object.to_s.camelize.constantize.find(params[:id])
# adjust the following if-clause to your needs
if params[:value].blank?
params[:value] = "..."
end
@item.update_attribute(attribute, params[:value])
render :text => @item.send(attribute).to_s
end
end
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---