Skip to main content

Community

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.

2 posts Gravatar

How should I implement a week model with days and opening times?

Rails • Asked by Drilon Buzuku

Hello, I need a week model which contains all weekdays and every weekday has multiple opening and closing times. For example, a barber shop is open on every monday from 9 a.m. to 11 a.m. and 1 ...


2 posts Gravatar

why drop down menu (Account Setting)is not showing in sidebar?

Rails • Asked by naveen kumar

``` my html <!DOCTYPE html> <html lang="en"> <head> <%= csrf_meta_tags %> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta charset="utf-8"> <me...


7 posts Gravatar

why destroy action is called two times.

Rails • Asked by naveen kumar

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


3 posts Gravatar

I didn't understand this part of the Liking Posts

Rails • Asked by Maor Tzabari

``` <div id="likes"> <%= render partial: "likes" %> </div> ``` we render something here, but where is this partial? usually when I render something with Rails it's a form or other code th...


3 posts Gravatar

How to add ssl to the CDN of AWS

General • Asked by Francisco Quinones

Hi so I have a rails app with ssl from godadddy with a wildcard for subdomain. Now I move my assets to use CDN, but I need to use the ssl so all my subdomain use the assets with out getting CORS po...


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

Extend Sprockets to bundle mustache templates

Rails • Asked by Alex Musayev

Extend Sprockets to bundle mustache templates I'm trying to include some Mustache templates into the main JS bundle. The idea is to take `/app/templates/*.mustache` files, generate a JSON object...


4 posts Gravatar

ActiveRecord

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