ruby - How do I include Responder in ActionController::Metal in Rails 3? -


I am working with a Rail 3 controller which has a very specific, limited purpose, and I need to answer it To answer is: json.

This screencast says that my controller can inherit from ActionController :: Metal, and after that I need to speed up some things:

When my controller looks like this Is:

  class folder controller & lt; ActionController :: Metal respond_to: json def All response_with folder.all end end  

I get an error:

  Unfinished method 'feedback_to' for folder controller : Class  

I have tried the Respondor, Action Controller :: Respondent, including the Action Controller :: Metal :: Respondent, but none of these works to achieve this liability functionality. What am I involved in?

You need to include more classes, not only the respondent here is my application controller but all of them Can not be required:

  class Api :: ApplicationController & lt; ActionController :: Action Controller :: Helpers in Metals include ActionController :: UrlFor ActionController :: Redirectioning includes ActionController :: ActionController to enable # operation: # ConditionalGet # response_to and respond_with ActionController Includes :: MimeResponds #: Xml or: json includes ActionController :: Cookies # The Object Controller :: Callback # Callback includes ActiveSupport :: Rescuable for your authentication log # resque_frame Spur include Rails.application.routes.url_helpers end  

Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -