
How to count comments like reddit (infinite nested model) ?
2
Ruby
Hey Chris,
I have an `item` model which gets submitted. With
`has_many :comments, as: :commentable, dependent: :destroy`
then in the `comment` model I have
`belongs_to :commentable, polymorphic...
Solved

URL Based multi tenancy
10
General
I'm new to Ruby on Rails, trying my best to catch up. for example... i've a domain and a username append to it, www.domain.com/samsoft, how can i achieve this and also routing? sample code will be ...
Chris Oliver replied
Solved

Commontator with Trix
3
Gems / Libraries
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\comments\_f...
Solved

Dynamically create sass variables in rails
6
CSS
I have a multi-tenant app where each tenant can set their primary and accent colors. Is there a way i can grab those values and insert them into a sass file on page load? I"m using rails 5 and post...
Matt Taylor replied
Solved

What is the best way to add a dynamic active class to a link with Tailwind CSS?
6
CSS
From what I understand the "active variant" is not enabled by default? Where exactly do you enable that with rails? Is there another way to add and remove parts of classes to put together an active...
Solved

Using React
19
Rails
I'm trying to learn how to use react in my rails 5 app.
I've just finished following Kenny Hibino's you tube series for his medium clone. He used react-rails gem, but then realised he wanted to u...
Rio replied
Solved

API
2
General
Hi everyone,
I have recently set on a mission to learn more about APIs. I get some data from a external JSON API but have come a cross an issue that I need some help with.
I’ve defined my cars v...
Solved

How do I create an attendance form for student attendance?
9
General
I've been racking my brain and just need to ask for help on the creating this function in my app.
**Scope:** simple app for non-profit for tracking student attendance
What I've done:
* created the...
Solved

Extend Sprockets to bundle mustache templates
3
Rails
I'm trying to include some Mustache templates into the main JS bundle. The idea is to take `/app/templates/*.mustache` files, generate a JSON object, and set a window-level variable, like this:
``...
Solved

I joined GitHub Education
5
Tips
I joined GitHub Education. How can I validate the account in Gorails to take advantage of the benefit?
Juan Mark replied
Solved

Format of created_at for date range using Searchkick
12
Rails
I am using searchkick to build out a searchform that has a couple different parts to it and searches across multiple models. I am specifically trying to get a date range setup so the user can searc...
Chris Oliver replied
Solved

Got error message when I install Capistrano, stuck at deployment for two days.
23
Servers
I spent 2 days followed "Deploy Ruby On Rails onUbuntu 18.04 Bionic Beaver" , tried to deploy my rails project, now i'm out of my mind! I have repeated whole process for more than 4 times, always ...
Solved

Why isn't the Boostrap Dropdown not working in the menu after loging in ?
10
Javascript
Hello, I started an app using the Jumpstart shortcut but didn't find out how and why the dropdown menu with the user's photo wasn't working at all... I guess it is because of javascript but after c...
Damian Nelwep replied
Solved

How do I make an app to get a video by url from youtube download it / process it/ and uploaded to a local db?
2
Gems / Libraries
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 Yo...
Solved

Webpack assets doesn't work after deployment
15
General
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 ...
Juan S. Caro replied
Solved