lib/carrierwave/orm/sequel.rb in carrierwave-0.3.0 vs lib/carrierwave/orm/sequel.rb in carrierwave-0.3.1

- old
+ new

@@ -9,28 +9,20 @@ super alias_method :read_uploader, :[] alias_method :write_uploader, :[]= - after_save do - send("store_#{column}!") - end - - before_save do - send("write_#{column}_identifier") - end - - before_destroy do - send("remove_#{column}!") - end + after_save "store_#{column}!" + before_save "write_#{column}_identifier" + before_destroy "remove_#{column}!" end # Determine if we're using Sequel > 2.12 # # ==== Returns # Bool:: True if Sequel 2.12 or higher False otherwise def self.new_sequel? - !!(/^(2.12|3)/ =~ ::Sequel.version) + ::Sequel::Model.respond_to?(:plugin) end end # Sequel end # CarrierWave