This project is archived and is in readonly mode.
skip_relative_url_root is broken
-
Pratik
- Assigned user set to Michael Koziarski
-
Pratik
- Assigned user set to Michael Koziarski
-
naruse
+1
-
naruse
This bug is correct and the patch above also correct for me.
Please merge it.:skip_relative_url_root is used for ignoring ActionController::Base.relative_url_root.
ActionController::Base.relative_url_root is needed when you run rails in relative environment
for example rails run in http://example.com/foobar/ not http://foobar.example.com/.
ActionController::Base#url_for and related methods uses this and returns correct paths, for example /foobar/users/new for new_user_path.But you sometimes want to get paths without such paths with relative_url_root,
for example the code runs as batch kicked by mail or cron.Though current code removes :skip_relative_url_root before they use it.
The patch above moves removing it to after use it.
This should be correct.else
# Delete the unused options to prevent their appearance in the query string.-
[:protocol, :host, :port, :skip_relative_url_root].each { |k| options.delete(k) } -
+[:protocol, :host, :port].each { |k| options.delete(k) } end trailing_slash = options.delete(:trailing_slash) if options.key?(:trailing_slash)url << ActionController::Base.relative_url_root.to_s unless options[:skip_relative_url_root]
So this bug and its patch is correct, please merge it.
-
-
Ryan Bigg
- Importance changed from to
Xavier, now that you have commit rights to Rails (or so I think?), perhaps you could commit this yourself?
-
Santiago Pastorino
- State changed from new to open
This issue has been automatically marked as stale because it has not been commented on for at least three months.
The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.
Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.
-
Santiago Pastorino
- State changed from open to stale
