Sha256: 136ecb6950a478a2e19f6e4671abcbea58cb589706300aaf4bf8bcbe56359041
Contents?: true
Size: 972 Bytes
Versions: 10
Compression:
Stored size: 972 Bytes
Contents
module Ixtlan module Rails module TimestampsModifiedBy module Base def self.included(base) base.prepend_around_filter(Filter) end end class Filter def self.filter(controller) name = controller.params[:controller] unless name.nil? parameters = controller.params[name.singular.to_sym] unless parameters.nil? parameters.delete(:created_at) parameters.delete(:created_on) parameters.delete(:created_by) # do not delete the updated_at so that optimistic persistence # can work !!!! #parameters.delete(:updated_at) parameters.delete(:updated_on) parameters.delete(:updated_by) end end yield if block_given? end end end end end ::ActionController::Base.send(:include, Ixtlan::Rails::TimestampsModifiedBy::Base)
Version data entries
10 entries across 10 versions & 1 rubygems