
Routing for Admin area not working
3
Rails
I've got an application that makes use of an admin area for managing Articles on the frontend.
Its a simple CRUD app where pretty much everything Admin related is namespaced and inside admin folder...
Solved

Attaching file to email Active Storage
1
Rails
Hi Guys,
I am trying to attach a pdf to an email via active storage. Here is my code below and the error I am getting.
class Assignment < ApplicationRecord
has_one_attached :upload
belongs...

ruby on rails nested model relationship and routes
9
Rails
I have these models: `Sport,` `Country,` `League` and `Match `
Also I do have `SportsController,` `CountriesController`, `LeaguesControlle`r and `MatchsController`
So the question is:
1: how i ca...

Why am I not getting any data inside the dropdown in browser?
2
Rails
My Controller has following code
`@select = Store.find(current_user.store_id)`
My View has:
```
<%= form_with(model:@store, local: true) do |f| %>
<%= f.select :id, options_for_select(@sel...

How do I set and use a default image with active storage?
3
Rails
If the User does not upload an image using active storage, how do I set a default image for that record?

How to start and stop ngrok with Thin server?
3
Servers
I'm using the basic Thin server on my dev machine and I'd like to start and stop ngrok automatically with `rails s` - how do I do that?I found several articles but they all involve more complex set...
Solved

How can I send emails 30 days before the time limit in rails?
3
Rails
I have a system that can send email every time I create a post, but I also need to notify 30 days before the expiration date through email, as you may know, the expiration date is variable and I co...
Solved

NoMethodError in Contacts#edit
1
Rails
Hi all, I am new to Ruby as well as RailsI am working my way through a treehouse course and I have hit a bit of an obstacle.This is what my routes file looks likeRails.application.routes.draw do
...

How do i generate links like shopify does ****.myshopify.com ?
1
Rails
Hey, guys i wanna know how to generate a unique url foreach user but didn't know how to do it.#Stuck

How do I make my Stripe Charges more robust [Background Worker & Idempotent]?
7
Rails
One thing I don't want to have to deal with are refunds because a customer happened to get charged twice. I want to ensure that I've designed my Rails app to be robust in the face of failure before...
Solved

Issue with inline-form from stimulus twitter example
2
Javascript
I have a rails 5.1 app that I am working the stimulus twitter example into. Instead of tweets they are going to be comments. The comments are linked to servicerequests. So on the servicerequest/sho...

How do I embed an internal routes/show page on to an external website?
1
Javascript
Hey all, I've seen websites where you place some Javascript code - and they are able to display information from another website on their website. Wondering how I can do the same? I have a www...

local_time gem: Where to place the I18n file to modify the string literals?
3
Rails
EDIT. Finally solved, I pasted the keys from I18n.coffee into application.js like that:LocalTime.config.i18n["es"] = {
date: {
dayNames: [
"Domingo",
"Lunes",
"Mar...
Solved

Upload image and send email without saving to the database
1
Rails
I recently tried to implement summernote to my rails app. I can send email and everything works fine. But I want to upload image and send the email, but the email received shows that the image was ...

URI::InvalidComponentError (bad component(expected scheme component): : https):
0
Servers
First of all, this problem is a persistent, and I'm trying to solve it for a week with 0 progress.I'm working on a Ruby on Rails website and using Devise and Omniouth-<social media> for authe...

How do I display related or similar Ads by currency on the Ad show page?
1
Rails
Hi Chris I need your help on this please. I'm trying to display related Ads on the Ad show page by currency. But somehow my script displays the same Ad in multiples of related Ads and n...
Solved

How do i put Icon inside a text_field usind Rails and Slim
1
Rails
I'm new to Rails and even more to Slim. I need to put an Icon (i'm using Fontawesome icon) inside a f.text_field, but have no idea how.My code has: i.fa.fa-user.fa-2x
=f.text_field :name , p...

Portfolio responsive view not rendering on mobile Chrome; Safari
2
CSS
Hi, I was trying to figure out this Declaration dropped on a live webpage https://lb-webportfolio.herokuapp.com/portfolios in the Console. It is all fine on the localhost, however after d...

What is the best way to house view logic?
3
Rails
I have a view that is showing a list of steps. The steps are being pulled from the db with a status field.
There is a method that I've created that creates custom text based on the status, ie:
`...

new myapp
0
Rails
Hello!
Help me please!
I enter "rails new myapp", the terminal stops at this:
> "The dependency tzinfo-data (> = 0) will be unused by any of the platforms Bundler is installing for .bunler i...
Solved