Displaying 3 results from an estimated 3 matches for "account_subdomain".
2007 Oct 26
3
Specing with Subdomains as Account Keys
...mpany < ActiveRecord::Base
has_many :items
def find_items(*args)
items.find(*args)
end
end
# application.rb
class ApplicationController < ActionController::Base
before_filter :find_current_company
def find_current_company
@current_company = Company.find_by_subdomain(account_subdomain)
end
end
2006 Feb 18
3
scoped databases need explanation...
Could someone explain this
http://blog.leetsoft.com/articles/2005/10/31/scoped-databases
in a way that can be understood with an example if possible. Tobi Lutke
has started to explain but it does not make any sense.
"Since rails 0.13.1 we support calling class methods over associations."
what?? give an example.
also
"The Shop object is figured out at the beginning of each
2006 Jan 25
6
Displaying based on hostname/subdomain
Ive tried multiple ideas to get this to work, but keep hitting a dead
end. Has anyone done this before?
I want joe.domain.com to display www.domain.com/profile/joe
Im using lighttpd.
Routes dont have access to the URL string and therefore I cant code in
a conditional. lighttpd rewrite seems to really screw it all up. Is
there a feasible solution?
Thank you,
Joe Noon