Rails 2.1
Update to Rails 2.1 final.
This commit is contained in:
parent
fd554cce90
commit
516d6dfac0
257 changed files with 4058 additions and 1933 deletions
|
@ -15,6 +15,10 @@ class Company < AbstractCompany
|
|||
end
|
||||
end
|
||||
|
||||
module Namespaced
|
||||
class Company < ::Company
|
||||
end
|
||||
end
|
||||
|
||||
class Firm < Company
|
||||
has_many :clients, :order => "id", :dependent => :destroy, :counter_sql =>
|
||||
|
@ -43,6 +47,7 @@ class Firm < Company
|
|||
has_many :readonly_clients, :class_name => 'Client', :readonly => true
|
||||
|
||||
has_one :account, :foreign_key => "firm_id", :dependent => :destroy
|
||||
has_one :account_with_select, :foreign_key => "firm_id", :select => "id, firm_id", :class_name=>'Account'
|
||||
has_one :readonly_account, :foreign_key => "firm_id", :class_name => "Account", :readonly => true
|
||||
end
|
||||
|
||||
|
@ -60,6 +65,7 @@ end
|
|||
class Client < Company
|
||||
belongs_to :firm, :foreign_key => "client_of"
|
||||
belongs_to :firm_with_basic_id, :class_name => "Firm", :foreign_key => "firm_id"
|
||||
belongs_to :firm_with_select, :class_name => "Firm", :foreign_key => "firm_id", :select => "id"
|
||||
belongs_to :firm_with_other_name, :class_name => "Firm", :foreign_key => "client_of"
|
||||
belongs_to :firm_with_condition, :class_name => "Firm", :foreign_key => "client_of", :conditions => ["1 = ?", 1]
|
||||
belongs_to :readonly_firm, :class_name => "Firm", :foreign_key => "firm_id", :readonly => true
|
||||
|
|
|
@ -4,4 +4,6 @@ class Pirate < ActiveRecord::Base
|
|||
has_many :treasures, :as => :looter
|
||||
|
||||
has_many :treasure_estimates, :through => :treasures, :source => :price_estimates
|
||||
|
||||
validates_presence_of :catchphrase
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue