I am getting this error following an update:

 currency_url failed to generate from
{  :action=>"show",
   :id=>#<Currency id: 138, currency_code: "", currency_name: "",...,
changed_by: "not available"> :controller=>"currencies"},

expected:
{  :action=>"show", :controller=>"currencies"},

diff:
{  :id=>#<Currency id: 138, currency_code: "", currency_name: "",...,
changed_by: "not available">} (ActionController::RoutingError)

Now, this particular model has the to_params methiod defined::

  def to_param
    currency_code
  end

So, I am wondering if this has anything to to with my difficulty.  The
routing for this controller is:


  map.resources :currencies

And the update method simply does this:

...
      if @currency.save
        flash[:notice] = 'Currency was successfully updated.'
        format.html { redirect_to(@currency) }
...

So, what am I doing wrong?
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to