Initial Commit

This commit is contained in:
Jason Katz
2011-06-14 18:08:28 -07:00
commit 5a34ac406c
172 changed files with 18457 additions and 0 deletions

9
app/models/asset.rb Executable file
View File

@@ -0,0 +1,9 @@
class Asset < ActiveRecord::Base
validates_presence_of :tag, :category
has_many :comments
has_many :softwares
def tag_with_name
"#{tag} - #{name}"
end
end

4
app/models/comment.rb Executable file
View File

@@ -0,0 +1,4 @@
class Comment < ActiveRecord::Base
validates_presence_of :commenter, :body
belongs_to :asset
end

4
app/models/software.rb Executable file
View File

@@ -0,0 +1,4 @@
class Software < ActiveRecord::Base
validates_presence_of :version, :platform
belongs_to :asset
end

9
app/models/user.rb Executable file
View File

@@ -0,0 +1,9 @@
class User < ActiveRecord::Base
# Include default devise modules. Others available are:
# :http_authenticatable, :token_authenticatable, :confirmable, :recoverable, :lockable,
# :registerable, :timeoutable, :activatable, :registerable
devise :database_authenticatable, :rememberable, :trackable, :validatable
# Setup accessible (or protected) attributes for your model
attr_accessible :name, :email, :password, :password_confirmation
end