Skip to content

Rademade/activerecord_sortable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Activerecord sortable

Installation

gem install activerecord_sortable

Usage

Add sortable option to relation. Table should contain column position or you can define column name.

# has many
has_many :posts, :sortable => true
has_many :user_posts, :class_name => 'Post', :sortable => true, :sortable_field => 'user_position'

# many to many
has_many :tags, :through => :post_tags, :sortable => true

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published