Class: Ping
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Ping
- Defined in:
- app/models/ping.rb
Instance Method Summary collapse
Instance Method Details
#before_save ⇒ Object
10 11 12 13 14 15 |
# File 'app/models/ping.rb', line 10 def before_save self.title = CGI.escapeElement(self.title, 'script') self.excerpt = CGI.escapeElement(self.excerpt, 'script') self.url = CGI.escapeElement(self.url, 'script') self.blog_name = CGI.escapeElement(self.blog_name, 'script') end |
#validate ⇒ Object
6 7 8 |
# File 'app/models/ping.rb', line 6 def validate errors.add('post_id', 'Must have a post id') if self.post_id == 0 end |