开发者

rails toggle problem - ActionView::TemplateError (undefined method `[]' for #<Enumerable::Enumerator

开发者 https://www.devze.com 2023-01-20 07:10 出处:网络
After this rails app has been running fine for over two years... just started getting this one error on only one page.

After this rails app has been running fine for over two years... just started getting this one error on only one page.

ActionView::TemplateError (undefined method `[]' for #<Enumerable::Enumerator:0xb25fbc4>) on line #10 of app/views/notes/_form.rhtml:
7:  <%= @n.text_field 'note', :size => 55  %>
8: </label>
9: <%= link_to_function('Custom Note', nil, :id => "custom_link", :class => 'control') do |page|
10:   page[:custom].toggle(:appear)
11:   page[:presets].toggle
12:   page[:custom_link].replace_html "Preset/Custom"
13: end %>

When I comment out lines 10 and 11, the lines with toggle, the page loads. But obviously doesn't do what I need.

Any 开发者_运维技巧suggestions on how to fix this?

0

精彩评论

暂无评论...
验证码 换一张
取 消