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

Why devise helpers are not available in application controller, except authenticate_user! ?

Rails • Asked by naveen kumar

undefined local variable or method `user_signed_in' in application controller but working fine in application.html.erb if user_signed_in layout 'admin_lte_2' else layout 'some_other_lay...


5 posts Gravatar

DRY Validations for Similar Models

Rails • Asked by Sillico

In my app I have restaurants which have a name, address, state, zipcode, country, and some other stuff. These restaurants have many locations, and each location belongs to a restaurant. The locatio...


10 posts Gravatar

Updating sort_index attr on a collection of models

Rails • Asked by Sean Washington

Hey there! I've got a collection of models (Product) and each product has an attribute called `sort_index` that allows the store owner to set a specific order for their products. The UI allows t...


11 posts Gravatar

Best way to create or save a record (with associations) as a template

General • Asked by Todd Quillen

I'm curious as to what people think is the best to create a new record, or save an existing record... as a template. The template would be used as a starting point to duplicate that record easily ...


19 posts Gravatar

Structure Guidance - Multi Tenancy Authentication / Authorization

Rails • Asked by Dan Tappin

I while back I was playing around building an app where you had multiple tenants (Company Model) and a single login (User Model). I then created roles (Role Model) to link the users to the tenants....


5 posts Gravatar

How to add or call a particular action in all the controllers ?

Rails • Asked by naveen kumar

I want to store the user activity by using after_action in the all the controller for a specific action of those controller


2 posts Gravatar

How do I add a default time of 6:45pm to simple form / DatePicker

Rails • Asked by Neil Patel

Hello Folllowing on from the prev 2 posts , How do i add the default time of 645pm in the form. So when someone craates the form a default time of 645 is already setup. I am using simple form a...


1 post Gravatar

Screencast Request: Unicorn vs. Puma

Site Feedback • Asked by Matthew Welke

I'd love to see a video describing the differences between Unicorn and Puma, and how to tweak the settings with them (process count, thread count, etc) to get the highest performance possible.


8 posts Gravatar

Deck Builder App. How do I query only decks you can make with the cards in your inventory?

Rails • Asked by Matias Fernandez

I'm making a deck building site similar to hearthpwn.com. It would be nice if users could filter decks based off the cards they have in their inventory. In other words, I'm trying to make a quer...


5 posts Gravatar

What text editor are you using for GoRails Forum?

General • Asked by Lauro Silva

Hey Chris & Community! :) What text editor are you using for the GoRails Forum post? Im following the episode [Markdown and Emoji with the html-pipeline gem](https://gorails.com/episodes/mar...


6 posts Gravatar

simple mde duplicates

Javascript • Asked by Talib Guyani

hi, i followed your tutorial but still simple mde is been diplicated am using rails 5 ``` var simplemde; simplemde = null; $(document).on('ready turbolinks:before-visit', function() { ...


3 posts Gravatar

Everyone's Been Bitten Before - Whitespaces/Unwanted Characters in User Input

Rails • Asked by Nick J

Hey all! I've got an interesting question, and I'm sure you're all handling it in different ways. I know there are plenty of ways to tackle this problem, so I was interested in what everyone's d...


3 posts Gravatar

Regexp for prices or how to detect price in a smart way

Ruby • Asked by Jack

Any regexp experts here? I have the following situation: - get an invoice - scan it for prices and save the highest number - success 🍾 I do this with a `.scan(/…/)`. Pretty fast in Ruby. ✨ ...


3 posts Gravatar

Autoloading models not working

Rails • Asked by Giancarlo Corzo

Hi, I have this model structure ``` /models /survey /questions question.rb survey.rb ``` I have used this autoloading in my application.rb so I don't have to deal with mo...


2 posts Gravatar

[HATCH] Some questions :)

Rails • Asked by Sascha M.

Hey there, i have a few questions rg. your new product Hatch. 1. is there a Heroku-like way to insert a SSL cert or do we need to do that manually? 2. What permissions are we granting so you...


4 posts Gravatar

[HATCH] Error deploying app

Rails • Asked by Masud Hossain

I'm getting this error when trying to deploy my project with hatch. I made sure I have the RSA file. Deployment Error ``` Fetching origin Warning: Identity file /home/deploy/.ssh/thinkrtc_rs...


4 posts Gravatar

SimpleMDE & RedCarpet

Gems / Libraries • Asked by Matt Taylor

So i have set up my forum with simpleMDE and i'm using RedCarpet to parse the markdown. Everything works great except when it parses the markdown, it adds extra set of `<p>` tags before and after m...


2 posts Gravatar

Building out a mini-framework with CoffeeScript

Javascript • Asked by Daniel LeGrand

A portion of the application I'm working on has a comments page with a form at top to add new comments and a list of comments beneath it. I've been working on using CoffeeScript classes to represe...


2 posts Gravatar

From the active cable chatroom series how to I fix the size of the chatroom and scroll

Javascript • Asked by John A. Cogan

I have implemented the chatroom but I want the chatroom area to be fixed and for the user to be able to scroll back through the messages. How can I add scrolling? I have tried added it to the pane...


5 posts Gravatar

Handling multiple Account types

Rails • Asked by Orlando Del Aguila

Hello Guys, I'm doing some research on how to handle multiple account types. In our app, we will have two types of accounts. **Parents** and **Schools**. These accounts will never change types, ...