I’m developing a facebook app and I need url_for to just spit out the
relative url of my controller and action path.
From what I’ve read everywhere I just need to add the option :only_path
=> true
and that should just spit out my relative url.
But that’s not what’s happening.
Here’s an example.
<fb:action href="<%= url_for :controller => ‘my_controller’, :action =>
‘my_action’, :only_path => true -%>">Show My Action</fb:action>
the fb stuff is just facebook markup language.
But anyway that should work, but it doesn’t, instead it’s linking right
back to full url which is my server that it needs to call to and takes
you out of the facebook app.
I’ve also added to my environment.rb
ActionController::AbstractRequest.relative_url_root="/myappname"
RAILS_RELATIVE_URL_ROOT="/myappname"
Any ideas?