Commit 6939af78241ef4b15cd8245ae93474c05ada683e
Exists in
master
and in
27 other branches
Merge remote-tracking branch 'origin/master'
Showing
2 changed files
with
13 additions
and
5 deletions
Show diff stats
| ... | ... | @@ -0,0 +1,13 @@ |
| 1 | +if Rails.env == 'development' | |
| 2 | + ActionController::Base.send(:prepend_before_filter) do |controller| | |
| 3 | + # XXX note that this is not thread-safe! Accessing a Noosfero instance in | |
| 4 | + # development mode under different ports concurrently _will_ lead to weird | |
| 5 | + # things happening. | |
| 6 | + if [80,443].include?(controller.request.port) | |
| 7 | + url_options = {} | |
| 8 | + else | |
| 9 | + url_options = { :port => controller.request.port } | |
| 10 | + end | |
| 11 | + Noosfero.instance_variable_set('@development_url_options', url_options) | |
| 12 | + end | |
| 13 | +end | ... | ... |
vendor/plugins/noosfero_urls/init.rb