My favorites | Sign in
Project Home Wiki Issues
Search
for
Install  
Installing and setting up RecordSelect in your own Rails application.
Featured
Updated Feb 4, 2010 by cainl...@gmail.com

PREPARING

  1. Install Paginator
  2. sudo gem install paginator
  3. Make sure you are including Prototype from your layout:
  4. <%= javascript_include_tag :defaults %>

INSTALL

  1. Download from GitHub and unzip into vendor/plugins.
  2. Then add the CSS and JavaScript to your layout by including the following line:
  3. <%= record_select_includes %>
  4. Enable and configure it on a controller.
  5. class UsersController < ApplicationController
    record_select :per_page => 5, :search_on => 'username'
    end
  6. Optional: to use RecordSelect RESTfully, add the following to your routes.rb:
  7. map.resources :model_id, :collection => {:browse => :get}, :member => {:select => :post}
  8. Now go ahead and use it somewhere.
Comment by wil...@gmail.com, Mar 1, 2008

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.

Comment by project member cainl...@gmail.com, Mar 3, 2008

Thanks Wilter, I'll merge some of that into the wiki's page.

Comment by jaim...@gmail.com, Aug 2, 2010

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

Comment by pk3...@gmail.com, Nov 2, 2010

I am facing the same issue as jaimemm. Are there any known workarounds to this? Thanks

Comment by je...@jesseclark.com, Dec 8, 2011

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


Sign in to add a comment
Powered by Google Project Hosting