I'am trying rails-api gem with jbuilder and i can't seem to make it work
Here is a sample of my rails-api controller / jbuilder views
Gemfile
gem 'jbuilder'
Controller app/controller/users_controller.rb
def show
@user = User.find_by(id: params[:id])
end
View app/views/users/show.json.builder
json.content format_content(@user.id)
According to the Jbuilder documentation this should work fine but still nothing is returned.
Thanks for the help!