Questions tagged [ruby-on-rails-6]

Ruby on Rails 6 is the latest version of Ruby on Rails, "an open-source web framework that's optimized for programmer happiness and sustainable productivity."

2084 questions
0
votes
1 answer

How to connect/link Javascript data to rails methods?

I am writing a custom DateTime method to get current web viewer's timezone and set all the time views to his/her timezone. How I get local timezone # index.html.erb <%= get_time( getTimeZone(), entry.created_at) %> # getTimeZone() =>…
axelmukwena
  • 779
  • 7
  • 24
0
votes
1 answer

keep content of my comment when i want edit him

I have comments for my gossips and i display them in the show of my gossips. When I clic on edit for my gossip that open new windows and that display me the actual title and content. But when I clic on edit for my comment that open the view for edit…
0
votes
1 answer

How to integrate in best way yarn package with Rails 6?

I have always problem how to integrate third party yarn package to Rails 6 project in the simplest way, for example @tabler/core. I know that I could do require("@tabler/core") in app/javascript/packs/application.js but not sure how it works and…
0
votes
1 answer

Rails 6 not saving to db

I am trying to save a record to a rails model. I use a postgres13 db as base db. (following this tutorial: Stripe Webhooks Tutorial) When I run the code, the id is returned and if I query the model from the console I can see all records. I do not…
Anselm Scholz
  • 478
  • 9
  • 20
0
votes
1 answer

rails 6 token authentication still needed?

I take courses on rails 5.x.x and when they used form they add a line for token authentication to protect their site, on the start of the form, like this : But…
0
votes
1 answer

Do Not purge image when updating record in Rails 6 Active Storage

I've been researching this issue for a couple days and can't seem to find a solution. I have a model in Rails 6 for bars that has_one_attached :image A user can create a new bar and attach an image. This works fine. When a user edits bar information…
0
votes
1 answer

Rails (6.1) app not finding generated Webpacker assets in production

I have a Rails 6 app that I am using with Webpacker. Things seem to work fine in development, but I am having issues getting it deployed into production correctly. I have a page that attempts to include a Webpacker pack: = provide(:title,…
Bryce
  • 2,802
  • 1
  • 21
  • 46
0
votes
1 answer

How to build a form which has different input data depending on where the form was called in Rails 6?

I am using a offer model to save offer details into the database. My offer looks like this: class Offer < ApplicationRecord belongs_to :company belongs_to :product belongs_to :clerk, optional: true end The order _index.html.erb partial gets…
timowin
  • 27
  • 5
0
votes
0 answers

Proper Rails solution to manifest.json not existing on the CI

When my tests run on CI, Heroku's specifically, they raise this error: Webpacker can't find application.js in /app/public/packs-test/manifest.json. Possible causes which I believe it's just because the frontend assets haven't been compiled. What's…
Pablo Fernandez
  • 279,434
  • 135
  • 377
  • 622
0
votes
2 answers

Heroku NameError: uninitialized constant Bundler, Could not detect rake tasks

I don't really what's going on. I keep getting the error... /tmp/codon/tmp/buildpacks/50d5eddf222a9b7326028041d4e6509f915ccf2c/lib/language_pack/helpers/rake_runner.rb:106:in `load_rake_tasks!': Could not detect rake tasks…
axelmukwena
  • 779
  • 7
  • 24
0
votes
0 answers

Handle raise ActiveStorage::InvariableError after Deleting a file that uploaded with active storage

Hello i uploaded an image with active storage specificly an avatar for my model users, but after of upload this image, i delete this of the folder that contained the file. then, i have one attachment that exists without file. i am checking…
0
votes
0 answers

Form not submiting using form_with

I am trying to submit form but unfortunately nothing is hapening, there is no error which i can debug. When press submit nothing happens, I appreciate your help. View:
0
votes
1 answer

I can't deploy a working rails 6 app on cloud foundry due to bundle version

I am experiencing this issue even having a higher version of bundler in my gemfile. What could be the issue causing this? APP/PROC/WEB 0 from /home/vcap/app/bin/bundle:3:in `
' Feb 18, 2021, 08:40:32 PM APP/PROC/WEB 0 from…
Kas Barlow
  • 101
  • 2
  • 7
0
votes
1 answer

Use'data-confirm-modal'on rails6

【want to】 I want to introduce data-confirm-modal in rails6 and create the following modal. version ruby 2.7.1p83 Rails 6.0.3.5 【Current status】 As you can see, the default modal has come out. 【Steps tried】 1.Described in gemfile gem…
katahik
  • 427
  • 3
  • 14
0
votes
1 answer

Manually force trigger a change event on select in nested form using stimulusjs

Using Haml, ruby 2.7.2, rails 6.1.2.1, stimulus ^2.0.0 So, I am using a nested form that shows a select type. Based on the value of the select type, I will either show or hide a div. I'm converting my coffeescript to stimulus, and I'm not sure how…
1 2 3
99
100