forked from bofh/fetsite
AutoCommit Sam Aug 1 13:03:01 CEST 2015
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
class Survey::Choice < ActiveRecord::Base
|
||||
belongs_to :question, class_name: 'Survey::Question'
|
||||
attr_accessible :picture, :sort, :text
|
||||
attr_accessible :picture, :sort, :text, :icon, :picture_cache
|
||||
has_many :answers, class_name: 'Survey::Answer'
|
||||
include ActionView::Helpers::TagHelper
|
||||
mount_uploader :picture, PictureUploader
|
||||
def to_s
|
||||
self.text
|
||||
end
|
||||
def html
|
||||
content_tag("i","", class: self.picture ) + self.text
|
||||
content_tag("i","", class: self.icon ) + self.text
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user