Sha256: 7f248dffe42f3bd1d528d06bbb17547e2bad66d6f5c103f8ffbd8f8ee6d4c7fb

Contents?: true

Size: 186 Bytes

Versions: 7

Compression:

Stored size: 186 Bytes

Contents

class Post < ActiveRecord::Base
  belongs_to :comment
  belongs_to :user
  
  validates_presence_of :body
  validates_presence_of :name, :if => :user?

  def user?
    !user
  end
  
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
squeezer-0.2.1 lib/generators/squeezer/templates/app/models/post.rb
squeezer-0.2.0 lib/generators/squeezer/templates/app/models/post.rb
squeezer-0.1.11 lib/generators/squeezer/templates/app/models/post.rb
squeezer-0.1.7 lib/generators/squeezer/templates/app/models/post.rb
squeezer-0.1.6 lib/generators/squeezer/templates/app/models/post.rb
squeezer-0.1.5 lib/generators/squeezer/templates/app/models/post.rb
squeezer-0.1.4 lib/generators/squeezer/templates/app/models/post.rb