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

current_subdomain in test alway is "test" #25

Closed dieuit07 closed 12 years ago

dieuit07 commented 12 years ago

Hi everyone, I test with rspec , when call :

login (@customer)
get :show

and in function :

...
@customer=Customer.find_by_user_name(current_subdomain)
...

but current_subdomain alway return => 'test' need your helps :D

pboling commented 12 years ago

Interesting. I'll have a look when I get a chance.

dieuit07 commented 12 years ago

I have solution for it , just add @request.host = "#{@customer.user_name}.example" after sign_in @customer to set subdomain :D