Custom Turbo Confirm Modals with Hotwire in Rails Discussion

8
General
Thanks for this
Adrian Marin replied

Using will_paginate and .limit(x) together.

6
Rails
Hi It appears that will_paginate and .limit(x) will not work together. So this didn't work: (I am trying to get 150 most recent records and paginate them) @articles = Article.where.not(site_i...
Simon P replied
Solved

How to Build Custom ActiveRecord Validations Discussion

3
General
How does "resizable_image: true" work? I'm assuming that because you named your validator "resizable_image_validator.rb" with a class name "ResizableImageValidator" and then calling "validates :ava...
Cheree Shuler replied

How to Upload Files Directly To S3 Using Paperclip And Dropzone.js

4
Rails
[How to Upload Files Directly To S3 Using Paperclip And Dropzone.js](https://www.railscarma.com/blog/technical-articles/upload-files-directly-s3-using-paperclip-dropzone-js/)

How do I include FontAwesome Pro in a Rails 7 project?

2
Rails
I own a license to FA Pro, and I want to use it in a new Rails 7 project. It doesn't look like I can do an importmap include of the pro font awesome, or if so, I'm doing it wrong. So I downloaded ...
ramzieus replied

How do I check if a model inside a model has been liked?

1
Rails
Hello there! I implemented likes to my app using this tutorial https://gorails.com/episodes/liking-posts. I went a little bit different route though. I have PollItem < Poll. Poll has_many :poll_...
William Murphy replied

Tabs with Stimulus

7
Javascript
Hi Chris - I've been following your guide on adding tabs with Stimulus here: https://github.com/excid3/tailwindcss-stimulus-components I am not using Tailwind but everything is working. However, w...
Chuck replied
Solved

Clean Javascript Code Using Data-Behavior On The Frontend Discussion

11
General
is data-behavior just semantics or could we use anything?

How do I import a Sass library from within a "node_module" (Rails 5.1)?

11
Rails
Pretty much the question above! I have a Rails 5.1 app with webpacker installed, and I used npm to install a front end framework: `npm install bulma --save` Now that it is inside of `node_module...
Ryan Martin replied
Solved

[Newbie] How can i keep data while "add field" or "change fieldname" in model?

1
Rails
sorry my english. if my user model have ``` t.string :name t.string :age ``` and data ``` 1 : John / 34 2 : Tom / 25 ``` if I want to add a field and change field name ``` t.string :english_name ...
Nicolás Bobb replied
Solved

Turbolinks and jQuery compatibility on Rails 5

4
Javascript
I have a hidden field that's activated when clicked on the link using jQuery. When clicking on the link, the field appears just for a second and then disappears. ```javascript $('.use-differen...
Lauro replied
Solved

rails 6 favicon.ico Webpacker can't find favicon.ico

2
General
app/javascripts/packs/application.js: import "favicons" app/javascripts/packs/favicons.js: const faviconsContext = require.context( ‘!!file-loader?name=../images/favicons/[name].[ext]!.’, true...
Stéphane Paquet replied

Single Table Inheritance (STI) with ActiveRecord in Rails Discussion

6
General
Thanks Chris, It's funny that we just stopped using this design pattern at Gitlab https://docs.gitlab.com/ee/development/database/single_table_inheritance.html
Maxime Orefice replied

How do I add an node express proxy server to rails app deployed on DigitalOcean via Classic Hatchbox using an nginx config file?

0
Servers
I’ve added an node express proxy server to an Ubuntu Digitalocean server that is used by my rails app and is deployed via Classic Hatchbox app that utilizes an nginx configuration file. The node e...
Alfred Montalvo Jr posted

Why this error ? how I fix this.

4
Rails
I have a form that has fields from two different tables, the Patients table and the Addresses table. Please make a search field to use only one patient (Patient) and return his data, up to the fiel...
Thomaz Wanderbruck Schmidt replied

Rails Association Question

1
Rails
Hello I have an app where I have a list of Cars. I have a form above that can filter them based on different attributes. I wish to add filtering based on their model and sub-models. Each car alre...
Chim Kan replied

Contribute to a gem

4
Ruby
I have two questions. How do I contribute to a ruby gem? Do I just locate it's repo and make a pull request? Or are there more formal procedures? Also, what if I've made some very useful methods...
lucywilson replied
Solved

How to create many subcategories in rails?

1
Rails
Without using any gems how do I do this in rails? I see the gem Ancestry (https://github.com/stefankroes/ancestry) ``` Main Category Sub Category Sub Category Sub-sub Category Main Category Su...
Solved

Using tailwind css in my rails app, patterned after your blog tutorial. How do I get rid of all the whitespace on each side of the page, I want to use the whole screen?

1
CSS
So I have modified by tailwind.config.js file as such: const defaultTheme = require('tailwindcss/defaultTheme') module.exports = { content: [ './public/*.html', './app/helpers/**/*.rb', ...
Mike Cannon replied

A few issues with tidying up @mentions

1
Rails
Hello, I was following along with the mentions episode here https://gorails.com/episodes/at-mentions-with-actiontext?autoplay=1 I made a few tweaks to help suit my application a bit better, and on...
Mylan Connolly replied

Want to stay up-to-date with Ruby on Rails?

Join 90,822+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.