Displaying 3 results from an estimated 3 matches for "find_by_subdomain".
2007 Oct 26
3
Specing with Subdomains as Account Keys
...ompany.rb
class Company < 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 Apr 25
4
belongs_to :through
belongs_to :through
Why is that not possible?
We should have:
Street
belongs_to :city
belongs_to :country, :through => :city
--
Posted via http://www.ruby-forum.com/.