Top "Rails-api" questions

Rails for API only applications (>3.2)

How can I get url of my attachment stored in active storage in my rails controller

How can I get url of my has_one model attachment stored in active storage in my rails controller. So, …

ruby-on-rails ruby rails-api rails-activestorage ruby-on-rails-5.2
Controller Specs vs Request Specs?

I'm working on a rails API and I'm now planning on writing some RSpec tests for the controllers. I've been …

ruby-on-rails rspec rails-api
rails-api authentication by header's token

I'd like to work with rails-api gem special to create API-only application. To provide authentication mechanism I want to use …

ruby-on-rails authentication rails-api
CarrierWave full url for default image

I am using CarrierWave for image uploads on a rails-api application which in turn is consumed by a backbone.js …

ruby-on-rails carrierwave rails-api
ActionController::RoutingError: uninitialized constant Api::V1::ApiController

I have Rails 5 API project for controlling user tasks and I have the following error but not always for the …

ruby-on-rails ruby ruby-on-rails-5 rails-routing rails-api
active_model_serializers not working in rails-api

I have been looking around a lot and have not found a solution. I have a rails-API application and simple …

ruby-on-rails-4 active-model-serializers rails-api
Rails api gem and devise token authentication

If someone could shed some light It would be greatly appreciated as I'm bit clueless on this issue. Basically I'm …

ruby-on-rails devise rails-api
How to merge another field in object in rails json response

Json response which I send is like that "ad": { "id": 3, "title": "dgdfg", "description": "kjlj", "video_file_name": "SampleVideo_1080x720_1mb.…

ruby-on-rails ruby json paperclip rails-api
Setting Content-Type header for RSpec and Rails-API

I'm using the rails-api gem to build a web service and want to test my API with RSpec. Every request …

ruby-on-rails rspec ruby-on-rails-3.2 rails-api
Using a different key name for an association attribute in rails api active model serializer

I am building a Rest API using rails-api and active-model-serializer to easily filter the required fields in the JSON. I …

ruby-on-rails json active-model-serializers rails-api