I'm having trouble adding a new method to the controller, here are the details:
matches_controller.rb routes.rb current .json.rabl Rake Routes Match Error in log application.rb I have done this in another application before, I do not know why this is not working. You can also close For more information, see the section on
DIF index @ matches = match. All rambler render: @mats and df current @ matches = match.fund_b_sql ("select * fade" Test start: rmat: @matches end
resources: matches, default: {format :: Json}, except: Edit, Edit: Current End and
Archive @ Match Features: ID: Live
name error (undefined local variable or method `flash '# and lieutenant; For Match Controller: 0x0000000d7b2368>): Block in app / controller / application_controller.rb: 6: in & lt; Class: ApplicationController & gt;
Class ApplicationController & lt; ActionController :: API ActionController :: MimeResponds includes CanCan :: ControllerAdditions rescue_from CanCan :: AccessDenied do | Exceptions | Flash [: Error] = Exception. Message Exceptions Message redirect_to root_url end DEF log_exception (exception) logger. Terror (Exception Message) Logger. Terror (Exceptions Backtrace.join ("\ n") End End
Flash directly to
rescue_from Can not access the blocked block. However, if you pass the symbol of the exception handler method, then you can reach
Flash . For example:
class ApplicationController & lt; ActionController :: API rescue_from CanCan :: AccessDenied, with: with> & gt; : Access_denied Private def access_denied (exception) Flash [: Error] = Exception. Redirect Message Root_Arnal End End
rescue_from .
No comments:
Post a Comment