rails 1.16
plug-in seems to be installed properly and it seems simple enough...
$ ls -l vendor/plugins/excel/ vendor/plugins/excel/lib/
vendor/plugins/excel/:
total 16
-rw-rw-r-- 1 craig craig 2952 Sep 9 15:38 init.rb
drwxrwxr-x 2 craig craig 4096 Sep 9 15:38 lib
vendor/plugins/excel/lib/:
total 12
-rw-rw-r-- 1 craig craig 6603 Sep 9 15:38 excel.rb
but when I try to use it, I get an error that the method isn''t
available
to my Controller...
NoMethodError
undefined method `addWorksheetFromActiveRecord'' for
Excel::Workbook:Class
(this is the from the simple example methodology). I can see that the method is
indeed in the Workbook Class of the Excel module. vendor/excel/init.rb does have
the requisite require ''excel''
This is the controller code...
def staff_list_all_export
@personnel = Personnel.current # this works for other methods in this
controller
e = Excel::Workbook
e.addWorksheetFromActiveRecord "Staff Roster",
"personnel", @personnel
headers[''Content-Type''] =
"application/vnd.ms-excel"
render_text(e.build)
end
I don''t have this issue with any other plugin that I am using.
Anyone with a guess?
Craig
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk
-~----------~----~----~----~------~----~------~--~---