Ruby on Rails Monday, July 21, 2014

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    end

Controller:

class Api::V1::UsersController < Api::V1::BaseController      def index      @user = User.find(params[:id])    end    end

RABL template:

object @user    attributes :first_name

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/5e32a03f-86dd-4e12-9890-4386cef96c64%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment