Is it necessary to use authentication with an API if there aren't really any 'users'?
3
General
I'm writing a React Native app that is purely informational (medical information), with a Rails API for the back-end.
The first main question I have is whether its necessary (or a good idea) to us...
Greg Blass replied
Solved
why destroy action is called two times.
6
Rails
my destroy action
def destroy
@owner = User.find(params[:id])
@owner.destroy
respond_to do |format|
format.html { redirect_to root_path }
format.js {}
end
my index page delete link
...
naveen kumar replied
Solved
Get Paperclip file before save
2
Rails
Is it possible to read the file, in my case image file, inside Paperclip::Attachment before the file is saved?
I need to send the image to an api first and then from the response it's given if it...
Agung Setiawan replied
Solved
Is it Ok to use "Error" as a model name in Rails project?
1
Rails
I have a simple question about class naming: is it Ok to use `Error` as a model name in a Rails project?
This model will be used to persist Ruby exception objects for errors monitoring. Using `Exc...
shakycode replied
Solved
Creating nested attribute with two parent attribute.
1
Rails
Hi,
Been going round in circles for a day or so but still can't seem to find a solution for this. I have project management chat app that on sign up, you create the project and the first chat mess...
Ariff Munshi replied
Solved
Multi tenant best strategy
5
Gems / Libraries
Hi,
I'm creating a multi tenant application using the apartment gem based on the video about multitenant here in gorails.
The model I choose was the Account instead of Users so I can have several...
Giancarlo Corzo replied
Solved
Caching static pages without CSRF token
4
Rails
Hi,
I'm looking to use `expires_in` method in my actions who returns static content.
For this pages I would like to return a cache control header where `public` is `true`. Like this it allow an p...
Nicolas Brousse replied
Solved
After adding the activeadmin gem, my previous style changed, How can avoid this?
2
Gems / Libraries
After adding the activeadmin gem, my previous style changed , How can avoid this?
Previous style is :

After adding the activea...
Larry Qu replied
Solved
How to setup the model associations for a simple e-marketplace?
3
Rails
Hey GoRails devs,
I am in the middle of setting up a marketplace (with stripe) and could use some help in conceptually thinking about the model associations. In the marketplace: a user can sell or...
Chris Oliver replied
Solved
How do I create two buttons that generate CSV files with different attributes?
3
Rails
Hello,
I have two questions: 1) I would like to create a button that can generate a CSV file with one set of attributes, and another button that will be able to generate a different set of attrib...
Steve replied
Solved
Proper location for null objects
2
Ruby
I've recently watched couple of screencasts on using Null Object Pattern: https://www.rubytapas.com/2017/01/31/two-screencasts-two-ways-eradicate-ruby-nil-values It was a good reminder about a ques...
Dan LeGrand replied
Solved
why my rails server logs show rendering a page two times, it that normal or there is something wrong with my code? Should it be only single time?
6
Rails
Processing by Users::HomesController#welcome as HTML
Processing by Users::HomesController#welcome as HTML
Rendering users/homes/welcome.html.erb within layouts/application
Rendering users/homes...
naveen kumar replied
Solved
Error monitoring and notification for RoR
4
Servers
I'm helping on a small RoR app. I need to set up error monitoring for it. `errbit` or `exception_notification` both look pretty good. This is a small app right now (< 200 users with logins, p...
Ashley Engelund replied
Solved
why there is no crsf token when i use remote true with data type as "script" ? How this is different from ajax?
1
Rails
<%= select_tag "event[#{inquiry.slug}]", options_for_select([ "PENDING", "CONFIRMED" ], inquiry.status), :data => {url: update_status_vendor_inquiry_path(inquiry),method: "put", type: "script...
Chris Oliver replied
Solved
How did you become good at back end development / Ruby on Rails?
7
Rails
My introduction to Ruby on Rails was a "complete course" on Udemy and reading Michael Hartl's book. A year's worth of dedicated practice later, I'm still struggling with my skills and understandin...
Alan Reid replied
Solved
has_many :through association woes
10
Rails
I have a has_many :through relationship between a few models that *almost* works.
My goal is to allow users to be assigned to projects and/or tasks. Everything seems to work except user_id's are n...
Adrian DeGus replied
Solved
API design/routing with nested resources
4
Tips
Hey all!
I'm just curious, how would you surface the ability to create nested items in an API? Say you have a model `Post` that `has_many observations`.
I have my base routes for both Post and Ob...
Chris Oliver replied
Solved
How do I debug why my ActionCable broadcast is returning nil?
4
Rails
Following along with the ActionCable Series.
So in **irb** when i run the `ActionCable.server.broadcast "notifications:4", {html: "Hello"}` it comes back with **nil** instead of returning **1**. ...
Matt Taylor replied
Solved
Solutions for high memory usage in rails development or production(heroku)
18
Servers
So i built my web app that allows users to chat with eachother, see who's online, and send notifications all using actioncable and it's using up A LOT of memory it seems. Correct me if i'm wrong, b...
shakycode replied
Solved
How do I add a default time of 6:45pm
1
Rails
Hi
Following on from the my previous post
I want to add a new time column with the default of 6.46pm
I have tried this
class AddUsualStartTimeToAreas < ActiveRecord::Migration
def change
...
Neil Patel replied
Solved