Class: Blogit::Comment

Inherits:
ActiveRecord::Base
  • Object
show all
Includes:
Validators
Defined in:
app/models/blogit/comment.rb

Constant Summary

URL_REGEX =

TODO: Check if this is optimal

/\A(http|https):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(([0-9]{1,5})?\/.*)?\Z/ix
EMAIL_REGEX =

TODO: Check if this is optimal

/\A[A-Z0-9._%+-][email protected][A-Z0-9.-]+\.[A-Z]{2,4}\Z/i

Instance Attribute Summary (collapse)

Instance Attribute Details

- (Object) nickname

nickname acts as a "honeypot" to catch spam the form field should be hidden using CSS and so if present, must be spam.

@attribute


36
37
38
# File 'app/models/blogit/comment.rb', line 36

def nickname
  @nickname
end