Ruby on Rails
movtable (Version #15)
UPDATED FOR RAILS 1.0
I have recieved a lot of mails about movtable not working for 1.0. So after answering a lot of people, I took 20 minutes of time and fixed it.
I hope to see some helpful contribution in the future.
I have ported
Movtable.
This is my first work in Ruby and this an adaption of a PHP source.
Anyway it seems to work, although not all features have been implemented. Feel free to improve the code.
To make it work you have to put:
- movtable_helper in your controllers directory
- list.rhtml,_table.rhtml,_navigation.rhtml,_filter.rhtml in your views directory
- javascripts files in your public/javascripts directory
- stylesheets files in your public/stylesheets directory
To use this just put the following lines in your controller:
helper :movtable
include MovTable
You can find the archive with all files here
Here is an alternative version, fixed by Paul Chin (not tested by me)
You can talk about movtable here
It’s a temporary location, probably changing in the near future.
Alessandro ViganĂ²
avigano@movinfo.it
Note (03/11/2006):
I could not get it to work in Rails 1.0. Can someone please post step-by-step instructions to get this working. I tried several variations and data but keep getting:
Showing app/views/testapp/_table.rhtml where line #64 raised:
You have a nil object when you didn’t expect it!
You might have expected an instance of Array.
The error occured while evaluating nil.each
Note: This module does not work with the latest versions of rails. If anyone has been able to patch this to make it work, please provide your patch here. There are problems with initialize parameters, and the Inflection of class names. There may be more problems that I am unaware of. I have contacted the author and am awaiting a response.
We appear to have Paul Chin’s version working with Rails 1.0. We kept getting 500 errors when running with lighttpd and fastcgi, but webrick worked. This appears to be resolved by changing the render command at the end of the list method in movtable_helper.rb. We changed it from “render :file => ‘lib/movtable/movtable.rhtml’” to “render :template => ‘member/movtable.rhtml’”.
We also had to move the movtable.rhtml file into our views directory to make this work under lighttpd.
UPDATED FOR RAILS 1.0
I have recieved a lot of mails about movtable not working for 1.0. So after answering a lot of people, I took 20 minutes of time and fixed it.
I hope to see some helpful contribution in the future.
I have ported
Movtable.
This is my first work in Ruby and this an adaption of a PHP source.
Anyway it seems to work, although not all features have been implemented. Feel free to improve the code.
To make it work you have to put:
- movtable_helper in your controllers directory
- list.rhtml,_table.rhtml,_navigation.rhtml,_filter.rhtml in your views directory
- javascripts files in your public/javascripts directory
- stylesheets files in your public/stylesheets directory
To use this just put the following lines in your controller:
helper :movtable
include MovTable
You can find the archive with all files here
Here is an alternative version, fixed by Paul Chin (not tested by me)
You can talk about movtable here
It’s a temporary location, probably changing in the near future.
Alessandro ViganĂ²
avigano@movinfo.it
Note (03/11/2006):
I could not get it to work in Rails 1.0. Can someone please post step-by-step instructions to get this working. I tried several variations and data but keep getting:
Showing app/views/testapp/_table.rhtml where line #64 raised:
You have a nil object when you didn’t expect it!
You might have expected an instance of Array.
The error occured while evaluating nil.each
Note: This module does not work with the latest versions of rails. If anyone has been able to patch this to make it work, please provide your patch here. There are problems with initialize parameters, and the Inflection of class names. There may be more problems that I am unaware of. I have contacted the author and am awaiting a response.
We appear to have Paul Chin’s version working with Rails 1.0. We kept getting 500 errors when running with lighttpd and fastcgi, but webrick worked. This appears to be resolved by changing the render command at the end of the list method in movtable_helper.rb. We changed it from “render :file => ‘lib/movtable/movtable.rhtml’” to “render :template => ‘member/movtable.rhtml’”.
We also had to move the movtable.rhtml file into our views directory to make this work under lighttpd.
Created on April 19, 2006 03:33
by
Stephen (24.159.241.108)