Ruby on Rails Community Forum

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

1
Rails
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_layout' en...
Chris Oliver replied

Updating sort_index attr on a collection of models

9
Rails
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 the...
Sean Washington replied
Solved

Screencast Request: Unicorn vs. Puma

0
Site Feedback
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.
Matt Welke posted

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

4
Rails
I want to store the user activity by using after_action in the all the controller for a specific action of those controller
nynhex replied
Solved

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

7
Rails
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 query ...
Matias Fernandez replied
Solved

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

2
Rails
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 doi...
Nick J replied
Solved

What text editor are you using for GoRails Forum?

4
General
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...
Lauro replied
Solved

[HATCH] Some questions :)

1
Rails
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 can ...
Chris Oliver replied

[HATCH] Error deploying app

3
Rails
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_rsa not...
Chris Oliver replied
Solved

Autoloading models not working

2
Rails
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 modules everyt...
Chris Oliver replied
Solved

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

1
Javascript
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 panel...
Chris Oliver replied

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

1
Rails
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 p.m...
Jacob Montgomery replied

Building out a mini-framework with CoffeeScript

1
Javascript
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...
Chris Oliver replied

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

1
Rails
``` my html <%= csrf_meta_tags %> <%= stylesheet_link_tag "bootstrap.min", media: :all %> <%= stylesheet_link_tag "dataTables.bootstrap.min",...
naveen kumar replied
Solved

I didn't understand this part of the Liking Posts

2
Rails
``` <%= render partial: "likes" %> ``` we render something here, but where is this partial? usually when I render something with Rails it's a form or other code that exist but what are w...
Maor Tzabari replied

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

rails testing always raise the same error

2
Rails
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 process 524...
csko12 replied

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

1
Rails
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 Form cod...
Chris Oliver replied

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

0
Gems / Libraries
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 json `...
Larry Qu posted

Learning Ruby on Rails? Join our newsletter.

We won't send you spam. Unsubscribe at any time.