diff options
author | Amanda Wagener <amanda@resolvedigital.co.nz> | 2010-12-01 11:43:26 +1300 |
---|---|---|
committer | Amanda Wagener <amanda@resolvedigital.co.nz> | 2010-12-01 11:43:26 +1300 |
commit | c38d9c3da5b9b21df07c4c7ebc8617413977c7fb (patch) | |
tree | 6feb6b3557630c5243eead5307320660a8201f2a /app/models/blog_comment.rb | |
parent | a1f7ea061ea2c9694a383c8d20137628a178d979 (diff) | |
download | refinerycms-blog-c38d9c3da5b9b21df07c4c7ebc8617413977c7fb.tar.gz refinerycms-blog-c38d9c3da5b9b21df07c4c7ebc8617413977c7fb.tar.bz2 refinerycms-blog-c38d9c3da5b9b21df07c4c7ebc8617413977c7fb.zip |
Remove all Rails2/Rails3 checks as master is now Rails3 only
Diffstat (limited to 'app/models/blog_comment.rb')
-rw-r--r-- | app/models/blog_comment.rb | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/app/models/blog_comment.rb b/app/models/blog_comment.rb index 63f9731..f608a1a 100644 --- a/app/models/blog_comment.rb +++ b/app/models/blog_comment.rb @@ -14,15 +14,9 @@ class BlogComment < ActiveRecord::Base validates_format_of :email, :with => /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i - if Rails.version < '3.0.0' - named_scope :unmoderated, :conditions => {:state => nil} - named_scope :approved, :conditions => {:state => 'approved'} - named_scope :rejected, :conditions => {:state => 'rejected'} - else - scope :unmoderated, :conditions => {:state => nil} - scope :approved, :conditions => {:state => 'approved'} - scope :rejected, :conditions => {:state => 'rejected'} - end + scope :unmoderated, :conditions => {:state => nil} + scope :approved, :conditions => {:state => 'approved'} + scope :rejected, :conditions => {:state => 'rejected'} def approve! self.update_attribute(:state, 'approved') |