I want to create a route such as
get '/referrals/send_invite/:email_address'
I will be calling this route via remote: true and GET. However if I issue the GET request in my browser, the route will still try to find a View, thus leading me to:
Template is missing
Is there a way that I could tell rails that the send_invite method in Referrals Controller doesn’t have a view associated?
I would hope that this could be accomplished by just using rails routes.
Thanks.
Not completely sure, but I am guessing you want to start the action
send_inviteso you are not interested in an actual result, correct?You could do something like
Note that that is not the only option, you could also do something like
or
Also note this should be a POST, since this action is not idempotent (a GET should not have side-effects).
Hope this helps.