Skip to main content
How do I manage business hours for a store?
Databases Solved • Asked by Taylor Cooney
I've taken a few stabs at this over the past two months and haven't found a great solution for what seems to be a straightforward feature seen in applications such as SkipTheDishes and UberEats. ...
6
posts

How to model these relations in Rails
Rails Solved • Asked by Drazen Mokic
For a couple of days now i am going back and forth how to models this. I currently have the following model structure and relations (simplified) ``` class Fleet < ApplicationRecord # ...
7
posts

How to attach a remote S3 file to an outgoing email? [SOLVED]
Rails Solved • Asked by Daniel Weaver
I'm using a regular mailer to send text emails and now I want to attach a file stored on S3 to the email. I have the URL of the file and was naively hoping something like this would work: ``` d...
4
posts

JWT with Devise (App and API)
Rails Solved • Asked by Stephen Gold
Hi, I'm looking to extend my Rails 5.2 application that uses Devise for authentication so I can support API requests via JSON. I have looked at Chris' videos and did some searching around -- mos...
4
posts

Webpack assets doesn't work after deployment
General Solved • Asked by Juan S. Caro
Hi, I have been using happily rails until I decided to try stimulusJS. In the begining was great. I saw great value using it. The thing is the assets in the pack folder are not compiled when doing ...
17
posts

How to test attachments in ActionMailbox?
Rails Solved • Asked by Lidia Wisniewska
I'm trying to test attachments using receive_inbound_email_from_mail, but when inspecting mail.attachments I get an empty array. Is there another way around this? receive_inbound_email_from_mail(...
4
posts

How do I integrate Uppy.io or Dropzone.js into Rails with ActiveStorage?
Gems / Libraries Solved • Asked by Ivan Raszl
[Uppy](https://uppy.io/) and [Dropzone](https://www.dropzonejs.com/) and popular js libraries that provide rich user experience for file uploads. ActiveStorage supports the integration of such libr...
3
posts

How do I remove Devise::Trackable from my app?
Gems / Libraries Solved • Asked by Daniel Weaver
I'd like to remove the Trackable module of Devise. Is it as simple as removing `:trackable` from the `devise` line in `User.rb` and then creating a migration to remove the columns created for th...
2
posts

How to do a incremental backup
Databases Solved • Asked by Nithil
Hey, taking a full backup every day will be huge, so thinking of doing a full backup once in a month & incremental backups every day or so. I would like to know the best solution to achieve this.
2
posts

How do I make an app to get a video by url from youtube download it / process it/ and uploaded to a local db?
Gems / Libraries Solved • Asked by emil mircea
I liked the shrine tutorials and would like to use that as an upload to local disk solution. I also found a gem called youtube-dl (https://github.com/layer8x/youtube-dl.rb) to help download from Y...
6
posts

Bootstrap-Sass Not working Entirely
Rails Solved • Asked by Jeremy Hill
I can tell that bootstrap is working but my navbar is not styled at all. I've tried several things to no avail. Any help would be greatly appreciated. This would be a huge milestone for me if I cou...
2
posts

How should I deal with lots of images?
Rails Solved • Asked by William Jones
I have a Rails app that lets users select an invoice from a list of invoices. When selected a view of the image of the invoice is displayed with an image of the customer signature overlayed on top....
5
posts

ActiveRecord/Routing madness
Rails Solved • Asked by Nelson Casanova
I'm not sure whats happening here, I feel like I've done this successfully in the past but for some reason my app is crashing all over. This is quite simple. Ive got a model `Employees` and it h...
2
posts

Commontator with Trix
Gems / Libraries Solved • Asked by Nelson Casanova
Good day robots, I'm trying to implement the Trix editor as the default editor for Commontator's comments. The default Commontator view is defined as follows in `app\views\commontator\comment...
2
posts

[Administrate] Autocomplete on 'foo: Field::BelongsTo'
Gems / Libraries Solved • Asked by Nelson Casanova
Hello, I'm currently doing some tests using Administrate to see if the functionality can be shaped in a way that is convenient for me... Some things have been quite easy and for the most part sa...
3
posts

"You must use Bundler 2 or greater..." Error
Rails Solved • Asked by Nelson Casanova
rails -v `Rails 5.2.3` ruby -v `ruby 2.6.1p33 (2019-01-30 revision 66950) [x86_64-linux]` bundler -v `Bundler version 2.0.1` On creating a new app and trying `rake db:create` i get: `You mu...
2
posts

New Project Rails 6 rc1 or 5.2.3?
General Solved • Asked by Chris Bishop
I am starting a new project soon (not a toy project) and wanted advice as to what version to start it in for Rails? Knowing i will do my best to keep it up to date with versions, should i start the...
5
posts

Display Posts on Homepage
Rails Solved • Asked by MikeLangford
I am building a social app and I want to display the content of the /posts page (index.html.erb) on the homepage if a user is logged in. The code below works just fine on the /posts page to dis...
3
posts

Install Bootstrap with Webpack with Rails 6 Beta
Javascript Solved • Asked by Shawn Wilson
For those of you who are going to give Rails 6 Beta a test run here is how I have installed Bootstrap 4.3.1 and configured with Webpack **Step 1:** `yarn add [email protected] jquery popper.js` ...
7
posts

Access the request object in a helper in a helper test (minitest)
Testing Solved • Asked by Wout
Using Rails 6 and minitest, I am testing a helper method which generates a JWT token to make a request to an external service. Inside the JWT's payload hash, I need the pass the source url. Ideally...
3
posts

Subscribe to the newsletter

Join 22,346+ developers who get early access to new screencasts, articles, guides, updates, and more.

    By clicking this button, you agree to the GoRails Terms of Service and Privacy Policy.

    More of a social being? We're also on Twitter and YouTube.