Displaying 1 result from an estimated 1 matches for "get_images_path".
2006 Aug 14
2
after_create is not being called
...n_key => ''title_photo_id''
validates_presence_of :title, :description, :file_path
def after_validation
if !errors.invalid?("file_path")
images = get_images
if images.size == 0
errors.add_to_base("There are no files in the directory
#{get_images_path}")
else
errors.add_to_base(images.inspect)
end
end
rescue SystemCallError
errors.add_to_base("The directory #{get_images_path} does not
exist")
end
def after_create
if errors.empty?
get_images.each do |image|
photos.create :file =...