|
Install
Installing and setting up RecordSelect in your own Rails application.
PREPARING
sudo gem install paginator <%= javascript_include_tag :defaults %> INSTALL
<%= record_select_includes %> class UsersController < ApplicationControllerrecord_select :per_page => 5, :search_on => 'username'end map.resources :model_id, :collection => {:browse => :get}, :member => {:select => :post} |
Sign in to add a comment
I installed the plugin, and it really works excellent.
Just for the newbies, like me, would be nice to add some comments to the Install documentation.
1.Add: you must add "require 'paginator'" at the end of config/environment.rb
2.Add: you must also include <%= javascript_include_tag :defaults %> in application.rhtml or in the <controller>.html.erb
4. :model_id is just a "placeholder", really you must add the real model name in router.rb, example: map.resources :users, :collection => {:broswe.......etc AND you MUST add it BEFORE others map.resources (i believe)
Finally, dear friends nuwbies, if everythings goes wrong, read the demo application sources: http://code.google.com/p/recordselect/source/browse/demo
Thanks Lance, excellent job, as always.
Wilter.
Thanks Wilter, I'll merge some of that into the wiki's page.