-class Balloon < ActiveRecord::Base
+class Balloon < Pettanr::Item
include ElementPart
belongs_to :speech_balloon
belongs_to :system_picture
# validates :caption, :presence => true
validates :settings, :extend_balloon => true
- before_validation :valid_encode
+ def self.singular
+ 'Balloon'
+ end
- def valid_encode
- ['settings'].each do |a|
- next if attributes[a] == nil
- raise Pettanr::BadRequest unless attributes[a].valid_encoding?
- end
+ def self.plural
+ 'Balloons'
+ end
+
+ def self.owner_type
+ :author
+ end
+
+ def self.valid_encode_columns
+ super.merge ['settings']
end
def self.colum_structures