मुझे यकीन है कि मैंने कुछ गलत कर रहा हूँ यहाँ हूँ, लेकिन यह है कि क्या अपने आवेदन नियंत्रक लग रहा है जैसे:मूल प्रमाणीकरण
class ApplicationController < ActionController::API
include ActionController::HttpAuthentication::Basic
include ActionController::MimeResponds
http_basic_authenticate_with :name => "joeyjojo", :password => "shabadoo"
end
मैं समझ नहीं क्यों मेरे http_basic_authenticate_with फेंक है यह त्रुटि:
undefined method `http_basic_authenticate_with' for ApplicationController:Class
मुझे यकीन है कि यह कुछ आसान है, लेकिन मुझे यह नहीं दिख रहा है। MimeResponds अन्य नियंत्रकों में बस ठीक काम कर रहा है।
क्यों आप से विरासत में मिली applicationcontroller actioncontroller :: एपीआई? –
यह [रेल-एपीआई मणि] का उपयोग कर रहा है (https://github.com/spastorino/rails-api) – thatmiddleway