lib/tabulatr/tabulatr/settings.rb in tabulatr-0.1.3 vs lib/tabulatr/tabulatr/settings.rb in tabulatr-0.2.0

- old
+ new

@@ -151,26 +151,14 @@ :format => false, # a sprintf-string or a proc to do special formatting :method => false, # if you want to get the column by a different method than its name :link => false, # proc or symbol to make the content a link :join_symbol => ', ', # symbol used to join the elements of 'many' associations :map => true, # whether to map the call on individual records (true) or call on the list (false) + :sort_by => false, # sort the elements of an association :sortable => true # if set, sorting-stuff is added to the header cell }) - # these settings are considered constant for the whole application, can not be overridden - # on a per-table basis. - # That's necessary to allow find_for_table to work properly - FINDER_INJECT_OPTIONS = WhinyHash.new({ - :pagination => :__pagination, - :filters => :__filters, - :classname => :__classname, - :sorting => :__sorting, - :checked => :__checked, - :store_data => :__store_data, - :stateful => :__stateful - }) - # defaults for the find_for_table FINDER_OPTIONS = WhinyHash.new({ :default_order => false, :default_pagesize => false, :precondition => false, @@ -180,14 +168,9 @@ # Stupid hack SQL_OPTIONS = WhinyHash.new({ :like => nil }) - - def self.finder_inject_options(n=nil) - FINDER_INJECT_OPTIONS.merge!(n) if n - FINDER_INJECT_OPTIONS - end def self.finder_options(n=nil) FINDER_OPTIONS.merge!(n) if n FINDER_OPTIONS end