rails-api Questions
5
Solved
I am building a Rails-API using Omniauth-facebook and Devise-token-auth with Angular and ng-token-auth for the frontend.
However when logging in with facebook I am presented with the error:
undefi...
Bufflehead asked 5/10, 2016 at 17:10
4
Solved
I have updated my rails api application from 5.1 to 5.2.
I am using rails api only.
I am trying to use the active storage. I think the problem is due to the line config.api_only = true in config/a...
Gens asked 10/6, 2018 at 6:32
5
Solved
I have been looking around a lot and have not found a solution.
I have a rails-API application
and simple model, controller, and serializer
but when I try to get index route I get standard rails ...
Beatrizbeattie asked 4/10, 2014 at 11:43
3
I have been stuck on this problem for several days and I don't know what is wrong with it. I started Ruby on Rails few months ago and I am currently learning authentication with API. I have looked ...
Nanny asked 31/3, 2016 at 18:13
4
Would want to add the url for the attached file, while responding to get request for a nested resource (say Document) for parent resource (say Person).
# people_controller.rb
def show
render json...
Tartarous asked 18/4, 2018 at 3:47
6
I'm actually working on an API which uses Rails 4. I would like to set the Content-Type of a request to JSON if the client does not specify a media type in Content-Type header.
In order to get tha...
Prostrate asked 10/4, 2014 at 13:25
4
Solved
I'm trying to write an Ember application in Rails 4, and have decided to go with rails-api for the api controllers, while keeping the application controller intact for a few pages that aren't part ...
Garrott asked 25/10, 2013 at 23:25
1
Solved
I am working on my rails RESTful API and I have set up a versioning feature on some of the endpoints. I have a class ApiVersion which Is responsible for determining which controllers to render base...
Brawny asked 4/5, 2021 at 19:44
7
Solved
I'm using the rails-api gem to build a web service and want to test my API with RSpec. Every request I make, regardless of the HTTP method has the CONTENT_TYPE header set as "application/x-www-form...
Nimitz asked 18/12, 2012 at 20:20
2
Solved
Whenever sending malformed JSON against my API-only Rails 5.x application, I get an exception and Rails is returning the entire stack trace as JSON. Obviously I'd like to respond with a nicely, cus...
Disabled asked 26/10, 2016 at 16:57
2
Solved
I have a react app that sends a POST request to my rails API. I want my API endpoint to generate a csv file and then to send back that file to the react app. I want then the browser to download of ...
3
Solved
I am building 2 apps; a front-end, and a back-end.
The back-end will be built using Rails API + Doorkeeper Gem (oauth2 provider) while the front-end will be built using React Native.
Currently, I a...
Attend asked 23/7, 2020 at 15:28
2
Solved
I've created a rails-api application and proceeded to secure it using token authentication.
I've set a before_filter that is calling a method which uses authenticate_or_request_with_http_token. Ev...
Federative asked 18/7, 2013 at 0:4
5
Solved
In my config/application.rb file, I have this code,
config.action_dispatch.default_headers = {
'Access-Control-Allow-Origin' => '*',
'Access-Control-Request-Method' => 'GET, PATCH, PUT, PO...
Sami asked 29/3, 2015 at 2:6
2
I googled a little bit to find a proper and easy to implement way to generate Swagger documentation for an existing Rails API app. To be short, there are 2 ways of implementation: either via contro...
Escribe asked 4/12, 2018 at 8:59
2
I'm trying to setup Authlogic with single_access_token for my rails backend app (I'm using rails-api gem).
I'm following this example: http://blog.centresource.com/2013/06/04/using-ember-auth-with...
Ugh asked 27/4, 2015 at 18:48
7
We're using active_model_serializers - 0.8.1 in a Rails application.
The app has some API specific controllers inheriting from ActionController::Metal in a way similar to rails-api's ActionControl...
Ambagious asked 20/11, 2013 at 16:18
1
This is my problem, I override the controllers for an User model:
mount_devise_token_auth_for 'User', at: 'auth', controllers: {
registrations: 'v1/authentication/registrations'
sessions: 'v1/au...
Sidesaddle asked 8/4, 2016 at 17:35
1
Solved
I'm writing an API-Only Rails App (rails 5.2) and I need to make use of ActiveStorage. I want to write an RSpec Request Spec to ensure that file uploads work properly, but that's proving very diffi...
Adherent asked 27/4, 2019 at 22:12
1
Solved
In the Ruby on Rails has_secure_token gem/feature, it creates a unique token upon record creation and stores it in the database as plain text. If I am using that token to grant users access to an A...
Propitiatory asked 10/1, 2018 at 18:18
4
Solved
How can I get url of my has_one model attachment stored in active storage in my rails controller. So, that I would be able to send it as full link as api in json.
So far, I have tried following met...
Occlusive asked 19/5, 2018 at 10:27
3
Solved
I am building a Rest API using rails-api and active-model-serializer to easily filter the required fields in the JSON. I am also using the has_one association in these serializers. All I wanted to ...
Abomination asked 30/12, 2014 at 14:42
4
I'm building a JS app with a Rails backend and in order not to confuse snake and camel cases, I want to normalize it all by returning camelcase key names from the server. So user.last_name would re...
Megdal asked 16/6, 2017 at 20:14
2
I have an API only rails app which needs documentation for frontend developers. And it's my first experience with it.
What tool do you use for this purpose? Note that I am using rails 5 API...
Helpless asked 9/2, 2018 at 7:38
1
Solved
I'm currently using Devise with my Rails API app to authenticate users using devise-jwt.
This is what my User model looks like:
class User < ApplicationRecord
devise :database_authenticatable...
Braunstein asked 9/10, 2018 at 1:33
1 Next >
© 2022 - 2024 — McMap. All rights reserved.