EmmanuelOga
2008-Jan-17 15:27 UTC
Verifiers for [PATCH] 7308 (Add ActiveResource.update_attribute(s)) needed
Hi, I verified an old Patch by rwdaigle http://dev.rubyonrails.org/ticket/7308 The patch adds two methods to ActiveResource: * update_attribute(attr, value) * update_attribute(attributes_hash) This is *very* useful on replacement of ActiveRecords with ActiveResources, because, as you probably know, a very common implementation of update method on restful controllers is as follow: def update @article = Article.find(params[:id]) respond_to do |format| if @article.update_attributes(params[:article]) flash[:notice] = ''Article was successfully updated.'' format.html { redirect_to(@article) } format.xml { head :ok } ... Please try and +1 the patch if you can --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
EmmanuelOga
2008-Jan-17 15:27 UTC
Verifiers for [PATCH] 7308 (Add ActiveResource.update_attribute(s)) needed
Hi, I verified an old Patch by rwdaigle http://dev.rubyonrails.org/ticket/7308 The patch adds two methods to ActiveResource: * update_attribute(attr, value) * update_attribute(attributes_hash) This is *very* useful on replacement of ActiveRecords with ActiveResources, because, as you probably know, a very common implementation of update method on restful controllers is as follow: def update @article = Article.find(params[:id]) respond_to do |format| if @article.update_attributes(params[:article]) flash[:notice] = ''Article was successfully updated.'' format.html { redirect_to(@article) } format.xml { head :ok } ... Please try and +1 the patch if you can --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---