Commit 86be6169

mo k <mo@mokhan.ca>
2012-08-08 02:45:28
remove unused validation.
1 parent 6357f2d
Changed files (1)
app
models
app/models/user.rb
@@ -1,18 +1,7 @@
-class UrlValidation < ActiveModel::Validator
-  def validate(record)
-    if(record.website.starts_with? 'http://')
-
-    else
-      record.errors[:website] << 'is invalid'
-    end
-  end
-end
-
 class User < ActiveRecord::Base
   validates :name,  :presence => true
   validates :website, :format => URI::regexp(%w(http https)), :allow_blank => true
   validates :city, :presence => true
-  #validates_with UrlValidation
   devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable
   attr_accessible :name, :email, :website, :twitter, :facebook, :city, :latitude, :longitude, :password, :password_confirmation, :current_password, :remember_me, :interest_ids
   has_many :creations, :dependent => :destroy
@@ -39,7 +28,7 @@ class User < ActiveRecord::Base
   def comment_on(creation, comment)
     Comment.create_for(self, creation, comment)
   end
-  
+
   def to_param
     "#{id}-#{name.gsub(/[^a-z0-9]+/i, '-')}"
   end