search for: delete_imag

Displaying 2 results from an estimated 2 matches for "delete_imag".

Did you mean: delete_image
2013 Sep 18
2
Accessing model attributes in ActiveSupport::Concern module
...hods in a module and set the path in the model. My problem is that I''m not able to access the attribute in my module. my model: class Job < ActiveRecord::Base include ImageModel image_dir = "jobs"end my module: module ImageModel extend ActiveSupport::Concern def delete_image unless pic_link == "" || pic_link == nil begin if File.delete(Rails.root.join("public", "images", image_dir, pic_link)) return true else return false end rescue return true #an error...
2006 Apr 12
1
Doing destructive actions with a GET request
...umn field within the form which is storing an image - their logo, avatar, or whatever, and I need a button right there in the middle of the form for them to delete their logo if they wish. Obviously I can''t nest a form within a form, so I was going to make this a link to a ''/user/delete_image'' action. Is there a better way of doing this (without heavy javascript, preferably)? TIA, Matt.