Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

initial README

  • Loading branch information...
commit 86de04ee8731fccce2d6c307e946df17ee01839d 1 parent 6ad036c
@AaronLasseigne authored
Showing with 42 additions and 0 deletions.
  1. +42 −0 README.markdown
View
42 README.markdown
@@ -0,0 +1,42 @@
+# with_order
+
+Provide ordering for tables, lists, etc.
+
+This project follows [Semantic Versioning](http://semver.org/).
+
+## Installation
+
+ $ gem install with_order
+
+If you're using Bundler, add this to your Gemfile:
+
+ gem 'with_order', '~>0.1.0'
+
+## Support
+
+<table>
+ <tr>
+ <td><strong>Ruby</strong></td>
+ <td>1.9</td>
+ </tr>
+ <tr>
+ <td><strong>Rails</strong></td>
+ <td>3.1</td>
+ </tr>
+ <tr>
+ <td><strong>Database Framework</strong></td>
+ <td>ActiveRecord</td>
+ </tr>
+</table>
+
+## Usage
+
+In your controller:
+
+ @data = Data.with_order(params, default: :full_name, fields: {full_name: 'first_name ASC, last_name ASC'})
+
+In your view:
+
+ <th><%= link_with_order('ID', @data, :id) %></th>
+ <th><%= link_with_order('Full Name', @data, :full_name) %></th>
+ <th><%= link_with_order('Email', @data, :email) %></th>
Please sign in to comment.
Something went wrong with that request. Please try again.