Questions tagged [responders]
21 questions
0
votes
1 answer
Rendering show template with Responders gem
So my question is how to render the show template only if the entity belongs to the current user. I have this code in my controller
def show
respond_with(@site) if current_user.author_of?(@site)
end
But it still renders the show template. What…

Олег Якунин
- 118
- 1
- 8
0
votes
2 answers
Empty body when respond_with used in Rails 5
I am trying to render a partial from a controller in rails 5 using ajax(on success) but the blank data is passed to ajax after the action renders a partial.
The Same code was working with rails4. I have also updated the responder gem too for rails5.…

Rachit Agarwal
- 31
- 7
0
votes
2 answers
Wrong number of arguments 0 for 1 unable to serialize model using devise
I am trying to create an api for my rails application in the Controllers folder I have created the following folder structure
controllers > api > v1
my routes look something like this
require 'api_constraints'
MyApp::Application.routes.draw do
…

Jeff Finn
- 1,975
- 6
- 23
- 52
0
votes
1 answer
Rails 4 respond_with include association with WHERE
I'm using rails respond_with to send a JSON response to the client, and I'm trying to figure out how to use the includes option in respond_with along with a where clause in my association
Here are my models:
class User < ActiveRecord::Base
…

user2635088
- 1,598
- 1
- 24
- 43
0
votes
1 answer
Rails responders and Layouts
Ok, so I have a Rails app, the 'responders' gem and Ember.js.
I have set up the ember.js, I have created a model to test my app ( Lead ) and the controller/layout/view that it needs. I use Rails 4.2, ruby 2.2 and MySQL.
So here is the controller I…

manosagent
- 614
- 8
- 18
0
votes
4 answers
Unable to return errors created on model
I'm using the gem Responders but I'm not able to show errors that I create on my models using erros.add(:base, 'Error message').
On my controller, before the respond_with @app, I debugged the @app object and it has errors @app.errors.any? returns…
user745235