Save 36% for Black Friday! Learn more

Ruby on Rails Community Forum

Actiontext used for templates/placeholders

0
Rails
I've got a little business finance management app and I'd love my users to be able to create their own custom templates for quotes/invoices. The way all my competitors do it is through merge fields...
Tim Dowling posted

How to Access rails User session into Laravel Application?

0
Rails
Hello, I have developed two Application one is main website which have all business logic's and functionality in ROR and second is my marketing website which i have developed in Laravel. Now i wan...
HardikShah47 posted

Can't resolve image into URL: undefined method `attachment_url' for #<#<Class:0x0 ...

1
Rails
Can't resolve image into URL: undefined method `attachment_url' for #&lt;#:0x00007f9f6493d770&gt; I spent hours to solve it but nothing !! Env: ruby : ruby 2.6.5p114 | Rails 6.0.2.2 what i did ...
almokhtar replied

Best product zoom plug in for rails WITH setup guide (that works for mobile and is not really old)?

0
General
I am building an ecommerce rails app using solidus... I am looking to get the products to zoom on hover on desktop and mobile. Fairly new to coding (esp JS) so would be great to have a proper up-to...
Gareth Phillips posted

Struggling with active nav tabs setting active class

0
Rails
I have an issue I haven't been able to solve. I have a products page set up with some different sections via bootstrap 4 nav tabs. General Info, Images, Pricing etc. I am trying to make it so that ...
spacerobotTR posted

How do I calculate a computed value in a model when showing or indexing over that model in its controller?

1
Rails
I'm new to Rails but not new to programming or webdev. I have a `Student` model that uses a service object to pull data from Google Cloud Firestore for its `level` attribute, an integer. I have ho...
Jordan T-H replied
Solved

How do I set a start value for 'serial' or sequence in psql

0
Ruby
Hi everyone, I have a migration like this: ``` def change add_column :orders, :order_number, :serial end ``` and when I create a new record in the database I get 1,2,3 etc., What I need is ...
Squealer182 posted

Working with ActiveRecord and Google Cloud Firestore

1
Rails
I'm pretty new to Rails, and I was wondering what the "right" way of architecting a small app would be given the following scenario. Users create Rooms, then from there add to them a number of refe...
Jordan T-H replied
Solved

Default Order of Associated Model Collection?

5
Databases
Hey all, I'm working on a side project where I recently switched from SQLite to Postgres in preparation for deployment. So, I replaced the `gem sqlite3` with `gem pg` in my Gemfile, ran`bundle i...
Chris Oliver replied
Solved

How can i switch to slave database in case of master fail?

0
Rails
I have 2 MySQL instances. One is master and the second is a slave. I want to configure the rails app in a way that if the connection to my master database failed, then auto-connect to the slave dat...
hetal sharma posted

Send ActionCable broadcast from javascript

1
Javascript
In the tutorials here, I've seen an ActionCable broadcast be initiated by a chat message save. The broadcast is sent via a relay to a background job and then the chatmessages on the clients update...
Chris Valentine replied

iteasykit does not exist.

1
Ruby
hello, I want to locally run a web site build with ruby on rails. I followed the tutorial until I get an error message that I can't solve: c:\Sites\FXCCsite&gt;rails server The path `c:/Sites/FXC...
daniel replied

How to destroy file with shrine when associated model has deleted ?

0
Rails
hi, someone knows how to delete an uploader file with shrine when the associated model is deleted like purge_later from active_storage.
francel.webdev posted

Keep getting undefined method `length' for nil:NilClass (NoMethodError)

0
Ruby
Hi guys, I have written the following code in Ruby that takes input from a user regarding plane and flight details and displays the user inputs as an array in the terminal. For example, if the use...
ibz95 posted

Video Streaming with Rails

0
General
Hi, I've been trying to find an efficient way to stream videos from Rails. I have about 10-20 videos that I would like to stream to an android application. I currently have a minimal application wr...
Hari Govind posted

Rails 6 Form remote: true Error

2
General
Hi, all! I am following along with the video on how to make a chat application using action cable. In the video, I believe Rails 5 is being used, however, I wanted to try it out with Rails 6. Eve...
Jake Smith replied
Solved

https://gorails.com/episodes/webpacker-javascript-in-rails-6

2
General
Hi Chris Thanks for the Episode. I'm new for Rails 6, and when I followed your lesson I've got the multi dubbing of the flatpickr on going the back page in a browser. Like this: [see screenshot](h...
Ted Leason replied

Encrypting ActiveText contents using Symmetric Encryption

0
Rails
Hey there, I’m using ActiveText, using the Trix editor, in one of my fields in my model. The model in question has the correct attribute: ``` has_rich_text :content ``` However, I’m looking at a w...
Vincent posted

Generic Infinite Scrolling

3
Rails
I am building an app that has a couple of columns and I only want one column to scroll infinitely. I am trying to hack together a gem free version, but I am a novice with .js or jquery. My questi...
Gabriel replied

Get Email from DataBase for creating newsletter

2
Rails
I am trying to create a newsletter, Ive followed this instructional video on how to save the information but I am confused on what to do from the end of the video, https://www.youtube.com/watch?...
Derek Levine replied

Learning Ruby on Rails? Join our newsletter.

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