Update to Rails 2.3.9 and itextomml 1.3.27
This commit is contained in:
parent
113e0af736
commit
ef30cc22df
200 changed files with 3065 additions and 1204 deletions
|
@ -106,6 +106,8 @@ class Author < ActiveRecord::Base
|
|||
"#{id}-#{name}"
|
||||
end
|
||||
|
||||
validates_presence_of :name
|
||||
|
||||
private
|
||||
def log_before_adding(object)
|
||||
@post_log << "before_adding#{object.id || '<new>'}"
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
require 'models/author'
|
||||
require 'models/event'
|
||||
|
||||
class EventAuthor < ActiveRecord::Base
|
||||
belongs_to :author
|
||||
belongs_to :event
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
class Pirate < ActiveRecord::Base
|
||||
belongs_to :parrot, :validate => true
|
||||
belongs_to :non_validated_parrot, :class_name => 'Parrot'
|
||||
has_and_belongs_to_many :parrots, :validate => true
|
||||
has_and_belongs_to_many :parrots, :validate => true, :order => 'parrots.id ASC'
|
||||
has_and_belongs_to_many :non_validated_parrots, :class_name => 'Parrot'
|
||||
has_and_belongs_to_many :parrots_with_method_callbacks, :class_name => "Parrot",
|
||||
:before_add => :log_before_add,
|
||||
|
@ -21,7 +21,7 @@ class Pirate < ActiveRecord::Base
|
|||
has_one :ship
|
||||
has_one :update_only_ship, :class_name => 'Ship'
|
||||
has_one :non_validated_ship, :class_name => 'Ship'
|
||||
has_many :birds
|
||||
has_many :birds, :order => 'birds.id ASC'
|
||||
has_many :birds_with_method_callbacks, :class_name => "Bird",
|
||||
:before_add => :log_before_add,
|
||||
:after_add => :log_after_add,
|
||||
|
|
3
vendor/rails/activerecord/test/models/polymorphic_design.rb
vendored
Normal file
3
vendor/rails/activerecord/test/models/polymorphic_design.rb
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
class PolymorphicDesign < ActiveRecord::Base
|
||||
belongs_to :designable, :polymorphic => true
|
||||
end
|
3
vendor/rails/activerecord/test/models/polymorphic_price.rb
vendored
Normal file
3
vendor/rails/activerecord/test/models/polymorphic_price.rb
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
class PolymorphicPrice < ActiveRecord::Base
|
||||
belongs_to :sellable, :polymorphic => true
|
||||
end
|
|
@ -1,4 +1,5 @@
|
|||
class Post < ActiveRecord::Base
|
||||
named_scope :with_type_self, lambda{{:conditions => ["type=?", self.name]}}
|
||||
named_scope :containing_the_letter_a, :conditions => "body LIKE '%a%'"
|
||||
named_scope :ranked_by_comments, :order => "comments_count DESC"
|
||||
named_scope :limit, lambda {|limit| {:limit => limit} }
|
||||
|
@ -52,6 +53,7 @@ class Post < ActiveRecord::Base
|
|||
end
|
||||
end
|
||||
|
||||
has_many :misc_tags, :through => :taggings, :source => :tag, :conditions => "tags.name = 'Misc'"
|
||||
has_many :funky_tags, :through => :taggings, :source => :tag
|
||||
has_many :super_tags, :through => :taggings
|
||||
has_one :tagging, :as => :taggable
|
||||
|
|
4
vendor/rails/activerecord/test/models/tee.rb
vendored
Normal file
4
vendor/rails/activerecord/test/models/tee.rb
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
class Tee < ActiveRecord::Base
|
||||
has_one :polymorphic_design, :as => :designable
|
||||
has_one :polymorphic_price, :as => :sellable
|
||||
end
|
4
vendor/rails/activerecord/test/models/tie.rb
vendored
Normal file
4
vendor/rails/activerecord/test/models/tie.rb
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
class Tie < ActiveRecord::Base
|
||||
has_one :polymorphic_design, :as => :designable
|
||||
has_one :polymorphic_price, :as => :sellable
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue