mbleigh / subdomain-fu

A new plugin approach to attempting to solve the usage of subdomains in linking and routing in Rails projects.
http://rdoc.info/projects/mbleigh/subdomain-fu
Other
586 stars 118 forks source link

Incompatible with Rails 4.2 #33

Closed jaredbeck closed 9 years ago

jaredbeck commented 9 years ago

The latest version, https://github.com/mbleigh/subdomain-fu/commit/3752799a02c0e18abd0a1bfb422925e880dc754e, is incompatible with rails 4.2.

lib/subdomain_fu/url_rewriter.rb monkey-patches ActionDispatch::Routing::RouteSet#url_for. The 1..2 argument method signature of the monkey patch:

def url_for_with_subdomains(options, path_segments=nil)
  # ...
end
alias_method_chain :url_for, :subdomains

is incompatible with the 1..3 argument method signature in rails 4.2.

See https://github.com/rails/rails/commit/212057b912627b9c4056f911a43c83b18ae3ab34, the commit which changes the method signature in rails.

jaredbeck commented 9 years ago

I have a fix for the url_for method signature issue. It's in https://github.com/debtcompliance/subdomain-fu Let me know if this project is still maintained and I'll make a PR.

jaredbeck commented 9 years ago

Closing due to lack of attention. Like I said, I have a fix, so let me know if this project is still maintained and I'll make a PR.