In my controller:

  web_method :new_resubmission

  def new_resubmission
    original = Submission.find(params[:id])
    resubmission = original.new_resubmission
    hobo_new resubmission do
      respond_to do |format|
        format.html { render :action => "new" }
      end
    end
  end

url_for gives a url like submissions/10/new_resubmission, which gives
the error

Unknown action

No action responded to 10. Actions: access_denied,
authenticated_user_from_cookie, authorized?, call_rake,
cancel_submission, create, create_auth_cookie, destroy,
do_cancel_submission, do_ready_submission, edit, index,
login_from_cookie, login_required, model, new, new_resubmission,
ready_submission, redirect_back_or_default, show, store_location, and
update

If I remove the "web_method" call in the above statement, url_for
gives a url like submissions/new_resubmission/10, which works fine
because it falls through to the rails default route.

I was under the impression that url_for used the routing system to
create it's routes so this is certainly a confusing issue.

Rather than fixing web_method, I'd vote for removing it.  (And
possibly add new_action).

cheers,
Bryan

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Hobo 
Users" 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/hobousers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to