diff options
Diffstat (limited to 'railties/guides/code/getting_started/app/models')
4 files changed, 0 insertions, 17 deletions
diff --git a/railties/guides/code/getting_started/app/models/.gitkeep b/railties/guides/code/getting_started/app/models/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 --- a/railties/guides/code/getting_started/app/models/.gitkeep +++ /dev/null diff --git a/railties/guides/code/getting_started/app/models/comment.rb b/railties/guides/code/getting_started/app/models/comment.rb deleted file mode 100644 index 4e76c5b5b0..0000000000 --- a/railties/guides/code/getting_started/app/models/comment.rb +++ /dev/null @@ -1,3 +0,0 @@ -class Comment < ActiveRecord::Base - belongs_to :post -end diff --git a/railties/guides/code/getting_started/app/models/post.rb b/railties/guides/code/getting_started/app/models/post.rb deleted file mode 100644 index 61c2b5ae44..0000000000 --- a/railties/guides/code/getting_started/app/models/post.rb +++ /dev/null @@ -1,11 +0,0 @@ -class Post < ActiveRecord::Base - validates :name, :presence => true - validates :title, :presence => true, - :length => { :minimum => 5 } - - has_many :comments, :dependent => :destroy - has_many :tags - - accepts_nested_attributes_for :tags, :allow_destroy => :true, - :reject_if => proc { |attrs| attrs.all? { |k, v| v.blank? } } -end diff --git a/railties/guides/code/getting_started/app/models/tag.rb b/railties/guides/code/getting_started/app/models/tag.rb deleted file mode 100644 index 30992e8ba9..0000000000 --- a/railties/guides/code/getting_started/app/models/tag.rb +++ /dev/null @@ -1,3 +0,0 @@ -class Tag < ActiveRecord::Base - belongs_to :post -end |