简体   繁体   中英

Roo cannot display spreadsheet, method unfound

I am using roo and would like to preview a spreadsheet by following the document says:
<%= spreadsheet @rspreadsheet, ["Tabelle"] %>
But the error says "undefined method `spreadsheet' " I don't know if i missed any gem.

BTW, I've added the 'spreadsheet' gem, while i feel it it nothing to do with this problem.

Roo doesn't seem to require the rails helper module.

require 'roo/roo_rails_helper'

in the controller works for me.

If you use Rails 3, you need to write

<%= raw spreadsheet @rspreadsheet, ["Tabelle"] %>

in the view.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM