Displaying 1 result from an estimated 1 matches for "field_video".
2006 Apr 13
0
Model with file uploads
...ng the file names in the database when I dont need to, plus I dont
think it is very flexible.
Here''s what I done. What do you think of this? Any suggestions?
class Video < ActiveRecord::Base
acts_as_taggable
attr_accessor :field_tags
attr_accessor :field_thumb
attr_accessor :field_video
validates_presence_of :title
validates_presence_of :description
validates_presence_of :field_tags
def validate_on_create
errors.add ''field_thumb'', ''Invalid thumb'' unless
!self.field_thumb.read.empty?
errors.add ''field_video'',...