Permalink
Browse files

first pass

  • Loading branch information...
1 parent 95b8a85 commit f531f07a6c5c83e6e2c997ae2f66bf7a16cef40a @wfarr wfarr committed Jul 1, 2010
Showing with 5 additions and 0 deletions.
  1. +5 −0 app/models/status.rb
View
@@ -1,6 +1,7 @@
require 'tinder'
class Status < ActiveRecord::Base
+ include Twitter::Autolink
validate :set_project_from_code
validates_presence_of :user_id, :message
validate :times_are_sane
@@ -28,6 +29,10 @@ class Status < ActiveRecord::Base
transitions :from => :pending, :to => :processed, :guard => :calculate_hours
end
+ def linked_message
+ auto_link self.message
+ end
+
def membership
@membership = (project? ? user.memberships.for(project) : nil) || false unless @membership == false
end

0 comments on commit f531f07

Please sign in to comment.