app/models/scribbler_image.rb in scribble_cms-0.8 vs app/models/scribbler_image.rb in scribble_cms-0.71

- old
+ new

@@ -3,10 +3,11 @@ #= Configuration dragonfly_accessor :image, app: :scribbler do after_assign{|i| i.name = sanitize_filename(image.name) } end + def sanitize_filename(filename) [filename.split(".").first.parameterize, filename.split(".").last].join(".") end #validates_presence_of :image @@ -14,9 +15,11 @@ validates_property :format, of: :image, in: [:gif, :png, :jpg, :jpeg], case_sensitive: false, message: I18n.t("not a valid image") + + #== Associations #== Plugins and modules #=== PlugIns