|
Install
Installing and setting up RecordSelect in your own Rails application.
Featured 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.
Hi,
After downloading cainlevy-recordselect-ec7b0d0 version, and setting up properly the controllers, the application raises "html_safe! undefined method".
Looks like it's only compatible with rails 3.0, am I wrong? Any compatibility fix in the scope?
Cheers
I am facing the same issue as jaimemm. Are there any known workarounds to this? Thanks
For anyone who lands here looking to use recordselect with a rails 2.3 app. As far as I can tell, all of the github forks in active development are rails 3 or greater only and it doesn't seem like anyone bothered to save a branch or create a tag of the last commit that was rails 2.x compatible.
To get around this, I have forked the project and created a branch which I believe is at the last commit before the project got upgraded to rails 3.0.
To install it run: ./script/plugin install git://github.com/jesseclark/recordselect.git -r rails2.3