Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
228 views
in Technique[技术] by (71.8m points)

ruby on rails - Impossible to delete a flash

I made a mistake before migrating a plugin, and have written

flash[:notice] = :label_presta_added

instead of

flash[:notice] = l(:label_presta_added)

I corrected my mistake but it seems that my Redmine Plugin has trashed my Redmine. Even though I delete my plugin a migrate once again, I still get this error:

    Started GET "/" for 127.0.0.1 at 2016-06-01 22:21:37 +0200
Processing by WelcomeController#index as HTML
  Current user: admin (id=1)
  Rendered welcome/index.html.erb within layouts/base (28.1ms)
Completed 500 Internal Server Error in 366ms (ActiveRecord: 116.0ms)

ActionView::Template::Error (undefined method `html_safe' for :label_presta_added:Symbol
Did you mean?  html_safe?):
     97:     <div id="sidebar">
     98:         <%= yield :sidebar %>
     99:         <%= view_layouts_base_sidebar_hook_response %>
    100:     </div>
    101: 
    102:     <div id="content">
    103:         <%= render_flash_messages %>
  app/helpers/application_helper.rb:312:in `block in render_flash_messages'
  app/helpers/application_helper.rb:311:in `render_flash_messages'
  app/views/layouts/base.html.erb:100:in `_app_views_layouts_base_html_erb__4104276684161420982_39604440'
  lib/redmine/sudo_mode.rb:63:in `sudo_mode'

Can somebody give me a hand here? Thanks in advance!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

This is stored in your session, so usually changing the session secret key will invalidate all sessions and discard any old session data.

You can also try and rescue to clear it out as a one-time deal.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...