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 [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-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to