Skip to main content


Subscribe to GoRails to join the conversation. Ask questions about your code, get help adding a new feature, and discuss implementation details with other members.

4 posts Gravatar

Dynamically create sass variables in rails

CSS • Asked by Matt Taylor

I have a multi-tenant app where each tenant can set their primary and accent colors. Is there a way i can grab those values and insert them into a sass file on page load? I"m using rails 5 and post...

2 posts Gravatar

How to render partial as a json response for json format?

Rails • Asked by Srinivasa Varma

Hi Guys. Recently i ran into a problem which does not allowing me to render a partial as a JSON response for .json requests. Below you can get in more detail. I have a partial resides in belo...

4 posts Gravatar

Is it necessary to use authentication with an API if there aren't really any 'users'?

General • Asked by Greg Blass

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 ...

4 posts Gravatar


Tips • Asked by Sarah

Rails console: Memoization seems to be a pretty awesome resource.

1 post Gravatar

How do I access the Google Adwords API to build custom reports for my clients.

Rails • Asked by Arjun Rajkumar

Hey! Just looking to learn how APIs work - and how I can access the Google Adwords & the Google Analytics APIs to get data from them and create custom reports for a client. New to APIs - so just tr...

2 posts Gravatar

How do I build a dynamic drop down menu in Rails with Simple Form?

Rails • Asked by Stephen Strange

I would like some help on how to build a dynamic dropdown menu with Rails Simple form. I'm really new to programming so any help will be appreciated. Many Thanks, SS Here is my Simple ...

5 posts Gravatar

Caching static pages without CSRF token

Rails • Asked by Nicolas Brousse

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 a...

2 posts Gravatar

rails testing always raise the same error

Rails • Asked by Larry Qu

No matter which test file does I run, it always raise this error. I don't konw how to fix this, thanks! ``` $rails test test/integration/about_test.rb Running via Spring preloader in proce...

4 posts Gravatar

After I submit(click) the form(submit input tag), the submit tag become disabled, how can I avoid this?

Javascript • Asked by Larry Qu

The purpose is add product to cart, target is blank. After I submit(click) the form(submit input tag), the submit tag become disabled, how can I avoid this? I need it is always enabled for cli...

3 posts Gravatar

Get Paperclip file before save

Rails • Asked by Agung Setiawan

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 ...

2 posts Gravatar

Is it Ok to use "Error" as a model name in Rails project?

Rails • Asked by Alex Musayev

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 `E...

1 post Gravatar

when use carrierwave to upload mutiple images in one product , the active_admin edit one product page error.

Gems / Libraries • Asked by Larry Qu

I want to add or upload multiple images in one product, but after I implement this , the active_admin edit product page error. in products_controller.rb, permit the images , which type is jso...

3 posts Gravatar

How can one setup a service booking app with time limitations?

Rails • Asked by Drilon Buzuku

Hey guys, how can one setup a service booking system where the customer can book services between 9am and 4pm on every monday and friday? Would you use the ice_cube gem to create timeslots and t...

6 posts Gravatar

Multi tenant best strategy

Gems / Libraries • Asked by Giancarlo Corzo

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 sev...

2 posts Gravatar

Creating nested attribute with two parent attribute.

Rails • Asked by Ariff Munshi

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 me...

4 posts Gravatar

Rails API backend with Electron Frontend

Rails • Asked by shakycode

I'm working on a SaaS platform that will be heavily API driven with a React or Vue front end. But there's a requirement for a desktop app to give the customer something "tangible" to hold in their...

2 posts Gravatar

Actioncable production settings when using heroku + custom domain

Servers • Asked by Masud Hossain

So I built a website and pushed it to heroku production `` and bought a domain to reroute to show whatever is on ``. This all works great, ex...

1 post Gravatar

error when i click on follow button ... Relationship is not working

Rails • Asked by khemlall mangal

All i am trying to create follow and follwers relationship and i am experiencing some issues. Chris i think you should create a course on this as well. i am getting issue undefined method `id' for ...

1 post Gravatar

Administrator creates user accounts with Devise gem

General • Asked by Nicolás Bobb

I have a project with Devise gem. I need to create a user with the admin account. If I am logged in with the admin account I can not enter the path / sing_up. How can I access this page?

5 posts Gravatar

How to write a conditional in a create action?

Rails • Asked by Adrian DeGus

I recently worked through the 4 episodes here on direct uploads to S3 with shrine. I have things setup to upload both images and documents and am now trying to write a conditional to create eith...