Ruby on Rails Community Forum

accepts_nested_attributes_for and :reject_if

0
Rails
Hello everybody! I have problem with nested attributes:. My model: ``` class MainTransactionElement < ApplicationRecord has_one :external_source accepts_nested_attributes_for :external_sourc...
Bartosz Michalak posted

Logger.debug to output command line results

2
Rails
I have an application where we have multiple domains mapped to same server and we need to create letsencrypt certificate for each of these domains. Along with this we need to create nginx files to ...
Anand Padia replied

Why rails is not using msgpack?

0
Gems / Libraries
I was trying to find a way to get better performance out on our solution and I thought that there is a possibility to ge data rendered in smaller bits than json. My research lead me to this article...
Anand Padia posted

Rails exceptions from reserved keywords

0
Rails
I keep bumping into exception errors that I believe are due to conflicts from reserved keywords. For example, I have a permit model with the attribute "gross_value." When my view tries to retrieve...
Simon Fisher posted

Whitelist parameters from a HTML table (Dynamic) and Save to JSONB format.

0
Rails
Hello, Myself Mukheem. I have just started working with Ruby on Rails. I am trying to create a small billing application where a receptionist can bill the items and give the receipt to customer....
Abdul Mukheem Shaik posted

How do I cache a complex JSON response (with a lot of belongs_to associations) to be used by Vue.js in the frontend?

0
Rails
Thanks to Chris nice tutorials, we just rewrote a slow interface in our app to use Vue.js. Now Rails is just generating the JSON to be consumed by Vue.js in the view. What I'm trying to achieve i...
TL posted

How do I save data from javascript form to rails model

0
Rails
I have a mortgage caluculator written in jquery in my rails app. I would like for the user to enter their information and be able to save the calculations to their profile. Store in a column "morta...
Ryan Bent posted

Polymorphic, STI, or something else?

0
Databases
I am working on an app for a real estate company. There will be 2 resources, Listings and Rentals. They will have a lot of the same data (address, beds, baths, sqft, etc.) but also different (ren...
Billy Purdy posted

view pdf file in web application and save the selected content

0
Rails
In my Ruby on Rails web application, an admin upload the pdf files from back-end, we need to save the pdf files.When it comes to front-end user can view the admin downloaded pdf file and he can sel...
Mahesh posted

How do i track view count of different div blocks on single page while scrolling without clicking them.

0
General
I have many cards (div blocks) on my single page application. I want to track view counts when user scroll through this page. Means whenever one card visible on screen or in screen viewport area wh...
Malav Desai posted

How do i track view count of different div blocks on single page while scrolling without clicking them.

0
Gems / Libraries
I have many cards (div blocks) on my single page application. I want to track view counts when user scroll through this page. Means whenever one card visible on screen or in screen viewport area wh...
Malav Desai posted

How add Push Api notification with Chatroom?

0
Javascript
How add Push Api notification with Chatrooms? Thanks!
Nikola Okonesh posted

How do I do multiparameter filter

1
Rails
Hi, I have some sort of e-shop. I have Category model and Product model. Product has some parameters like color, material, price etc. My question is what approach to use to filter by these paramete...
Dan Frenette replied

How do I add opensearch to a Rails app

3
General
I'm talking about the feature in chrome, it's present on GoRails, where if you type the URL of the site and hit Tab, you're able to search the site from the Chrome omnibar. I've gotten this to work...
Chris Oliver replied

How can I have two connections in ActionCable?

0
Rails
I have Notifications Channel and a Pings Channel. Notifications are identified by my devise modal Agents. But my Pings Channel needs to be identified by my other devise modal, Users. Heres some sud...
Colton Hagan posted

Problem upgrade rails version permission denied rvm folder /bin/rails

0
Rails
Hi, I try to install rails 3.2.20 with ruby2.2.0. So with rvm I make rvm install 2.2.0 After I make gem install rails -v 3.2.20 After rvm use default ruby-2.2.2 But when I try rails -v, I h...
AlessioVaralta posted

Create dynamic table for existing resource

3
Tips
Hello. I have an existing RoR site, and I've added a new resource that will allow users to add different coffee roasts. On the resulting table, I'd like users to be able to filter the restults ba...
Simon Cooper replied

how can i to combine acts_as_commentable_with_threading and notification system ?

0
Rails
i got undefined method `users' for # Did you mean? user user= comments_controller ``` def create commentable = commentable_type.constantize.find(params["comment"]["commentable_id"]) @comm...
learningrails posted

What is the method used today to give permissions with Rails?

0
Gems / Libraries
In many projects created with Rails I see that they do not use any gem to give permissions, for example Gitlab: https://gitlab.com/gitlab-org/gitlab-ce/blob/master/Gemfile What method is used tod...
Nicolás Bobb posted

What are your goals for 2018?

5
General
Hello all, Last year I posted a similar post, and it was really popular. So first off how many of your goals did you complete? Here's the [previous post](https://gorails.com/forum/what-are-your-go...
robert replied

Learning Ruby on Rails? Join our newsletter.

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