Sha256: a63b32995ebeeb9dbca1c5f511a21611ce47ab2e48ad487ccdb0fb450d2a010d
Contents?: true
Size: 371 Bytes
Versions: 5
Compression:
Stored size: 371 Bytes
Contents
module EditableComponents class ItemText < Item alias_attribute :data, :data_text def init self.data = self.name.gsub( /-/, ' ' ).humanize self end def update_data( value ) self.data = ActionController::Base.helpers.sanitize( CGI.unescapeHTML( value ) ) self.save end def self.type_name 'text' end end end
Version data entries
5 entries across 5 versions & 1 rubygems