finished post unit tests; added pool/tag alias/tag implication stub code
This commit is contained in:
@@ -2,7 +2,7 @@ class Pool < ActiveRecord::Base
|
||||
validates_uniqueness_of :name
|
||||
validates_presence_of :name
|
||||
validates_format_of :name, :with => /\A[^\s;,]+\Z/, :on => :create, :message => "cannot have whitespace, commas, or semicolons"
|
||||
belongs_to :creator, :class_name => "Person"
|
||||
belongs_to :creator, :class_name => "User"
|
||||
|
||||
def self.create_anonymous(creator)
|
||||
pool = Pool.create(:name => "TEMP - #{Time.now.to_f}.#{rand(1_000_000)}", :creator => creator)
|
||||
@@ -14,7 +14,7 @@ class Pool < ActiveRecord::Base
|
||||
post_ids =~ /\A#{post.id} (\d+)|(\d+) #{post.id} (\d+)|(\d+) #{post.id}\Z/
|
||||
|
||||
if $2 && $3
|
||||
{:previous => $2.to_i, :next = $3.to_i}
|
||||
{:previous => $2.to_i, :next => $3.to_i}
|
||||
elsif $1
|
||||
{:previous => $1.to_i}
|
||||
elsif $4
|
||||
|
||||
Reference in New Issue
Block a user