Hello,
I am trying to clean and dry up my controllers with my postbacks with
the following code in my controller:
def edit
@music = Music.find_by_id(params[:id]) || Music.new
if request.post?
@music.attributes = params[:music]
redirect_to :controller => ‘client’, :action => ‘show’, :id =>
session[:client] and return if @music.save
end
end
Now when I create a new album, it works fine, but when I try to edit it,
this is the error I get:
no route found to match “/music/edit/edit/3”
Why isn’t my code doing my edit properly?
Thanks,
M