Sha256: b2dee1cccc09b2bc037b49905ed50da9dde214d451decc8ca90654e6a875b374
Contents?: true
Size: 770 Bytes
Versions: 24
Compression:
Stored size: 770 Bytes
Contents
module ClarkKent module ReportConfig module ClassMethods def filter_config(params) filter_option_class = ('ClarkKent::' + ((params[:kind] + '_option').camelcase)).constantize filter_option_class.new(params) end def column_config(params) ClarkKent::ReportColumnConfig.new(params) end end extend ClassMethods def self.included( other ) other.extend( ClassMethods ) end end class ReportColumnConfig attr_accessor :name, :order_sql, :custom_select, :link, :time_zone_column, :time_format, :summarizable, :includes, :joins, :extra_scopes, :where, :group def initialize params = {} params.each { |key, value| send "#{key}=", value } end def id name end end end
Version data entries
24 entries across 24 versions & 1 rubygems