RailsCasts Pro episodes are now free!

Learn more or hide this

Francesc Pla's Profile

GitHub User: francesc

Site: http://www.francesc.net

Comments by Francesc Pla


Forgot to do the follow up. It was a problem with a gem modifying routes which deleted the subdomain constraints.


I agree, I think it would be more practical to be able to attach the sweeper to a model, you may want to expire the same pages or fragments in several controllers, rake tasks ... I suppose the problem is that the views are related and only accessible by the controllers and not models but it feels a little bit weird.


Thanks for your reply. Already tried the constraints but it didn't work out.


Is there a way to not have all other routes respond to the subdomain and viceversa? Since now that same content would get served on two urls and considered duplicated by search engines.

update: I've been doing some research but nothing found, I'm using a basic redirection depending on controller_name and request.subdomain in a before_filter in application_controller