lib/active_admin/views/components/table_for.rb in activeadmin-1.3.1 vs lib/active_admin/views/components/table_for.rb in activeadmin-1.4.0

- old
+ new

@@ -174,21 +174,12 @@ # # You can set the sort key by passing a string or symbol # to the sortable option: # column :username, sortable: 'other_column_to_sort_on' # - # If you pass a block to be rendered for this column, the column - # will not be sortable unless you pass a string to sortable to - # sort the column on: - # - # column('Username', sortable: 'login'){ @user.pretty_name } - # # => Sort key will be 'login' - # def sort_key # If boolean or nil, use the default sort key. - if @options[:sortable] == true || @options[:sortable] == false - @data.to_s - elsif @options[:sortable].nil? + if @options[:sortable].nil? || @options[:sortable] == true || @options[:sortable] == false sort_column_name else @options[:sortable].to_s end end