Sha256: 8272df972b2c79c787ae0c43cc5520b5e1c53980e791eda1140b4543d9229c9c

Contents?: true

Size: 433 Bytes

Versions: 2

Compression:

Stored size: 433 Bytes

Contents

class Person < ActiveRecord::Base
	extend SqlSearchableSortable
	
	#to be set from the sql_searchable method eventually
	#attr_accessor :ssns_sortable
	# def ssns_sortable(ssns_sortable)
	# 	@ssns_sortable = ssns_sortable
	# end

	sql_searchable :first_name, :last_name, :bio 
	sql_sortable 	 :first_name, :last_name, :email, 
		:updated_at => {:show_asc => false, :display => "Date last changed"}
	
	default_sql_sort :last_name
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sql_search_n_sort-2.0.0 test/dummy/app/models/person.rb
sql_search_n_sort-1.2.0 test/dummy/app/models/person.rb