I've took this post like basis but receive empty response every time. What's wrong?
Basic controller:
class Api::V1::BaseController < ActionController::Metal include AbstractController::Rendering include AbstractController::Callbacks include AbstractController::Helpers include ActionController::HttpAuthentication::Token::ControllerMethods include ActionController::Rendering include ActionController::Renderers::All include ActionController::MimeResponds include ActionController::Instrumentation append_view_path "#{Rails.root}/app/views" respond_to :json endController:
class Api::V1::UsersController < Api::V1::BaseController def index @user = User.find(params[:id]) end endRABL template:
object @user attributes :first_name
No comments:
Post a Comment