I've took this post 
<http://railsware.com/blog/2013/04/08/api-with-ruby-on-rails-useful-tricks/> 
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 [email protected].
To post to this group, send email to [email protected].
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.

Reply via email to