Permalink
Browse files

doc

  • Loading branch information...
1 parent 053273f commit 75f49e0a438ac593740ecc21097aa2005347cee4 Alexander Gräfenstein committed Mar 31, 2011
Showing with 14 additions and 33 deletions.
  1. +14 −33 README.rdoc
View
@@ -1,8 +1,20 @@
= Fancygrid
-Fancygrid is under heavy development. Things may change frequently.
+Fancygrid mades it easy to create and render tables for database records in rails.
+== Features
+* ActiveRecord and ActiveResource are supported
+* Ajax data fetch
+* Pagination
+* Simple search with LIKE condition
+* Complex search with 17 different conditions
+* Frontend column sorting
+* View state caching
+* May be rendered anywhere, not restricted to the index action
+* Column values may be attributes, methods or even custom blocks
+* Custom templates for column formatting
= Requirements
* jQuery >= 1.4.2
+* jQuery-ui (required if column sorting is wanted)
* Rails 3
* Haml
@@ -11,7 +23,7 @@ In your gemfile
gem 'fancygrid', :git => 'git://github.com/giniedp/fancygrid.git'
or for specific tag
- gem 'fancygrid', :git => 'git://github.com/giniedp/fancygrid.git', :tag => "0.3.3"
+ gem 'fancygrid', :git => 'git://github.com/giniedp/fancygrid.git', :tag => "1.0.0-pre"
Run
bundle install
@@ -234,37 +246,6 @@ render that cell with custom code.
end
end
-
-== Conditional output (Implementing a filter)
-The find options are the same like you put into the find method of an ActiveRecord model
-
- User.find(:first, <find_options>)
-
-So you can use the conditions to find the wanted data.
-=== Example
- # shows all users with a specific role
- def index
- fancygrid_for :users do |user|
-
- # ...
-
- user.find( :include => :roles, :conditions => ["roles.name = ?", "admin"] )
-
- end
- end
-
-If you have a filter that comes as an url parameter, you can pass it to the
-callback url, so the callback gets the same filter value
-=== Example
- def index
- fancygrid_for :users do |user|
-
- # ...
- user.url = users_path(:filter => params[:filter])
- user.find( :include => :roles, :conditions => ["roles.name = ?", params[:filter] ] )
-
- end
- end
== Order your conditions
If you have a large condition to make or you want to use a condition that depends on a users role, for example when

0 comments on commit 75f49e0

Please sign in to comment.