Sha256: e30c28ccb27ae10c13f6782371a338cdc50bdb352bacf282b7e6920ccf89636c
Contents?: true
Size: 466 Bytes
Versions: 5
Compression:
Stored size: 466 Bytes
Contents
class Ping < ActiveRecord::Base belongs_to :post validates_presence_of :post_id, :url def validate errors.add('post_id', 'Must have a post id') if self.post_id == 0 end 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 end
Version data entries
5 entries across 5 versions & 1 rubygems