Skip to main content

Questions tagged [ruby-on-rails-7]

For Ruby on Rails 7 questions: Ruby on Rails 7 is a web app framework in Ruby. Use tags like [ruby-on-rails], [ruby], [rails-7], [activerecord], [actionview], [actioncontroller], [routing], [authentication], [authorization], [database], [testing], [deployment], [gems], [api], etc. Provide specific details and errors.

1 vote
0 answers
42 views

Rails Gems that use JS not loading when navigating with Turbo in Production

I have a Rails 7 app using Turbo and ESBuild. Some of my Gems (Recaptcha, Chartkick etc) also have a JS component. While on my localhost everything works fine, after uploading to Heroku the charts and ...
almo's user avatar
  • 6,287
2 votes
2 answers
101 views

Rails: nested namespace produces a weird path to a partial, resulting a MissingTemplate error

I have an ActiveRecord model named Book, and a model named Book::Author. An author has many books through the Book::Authorship model (one-to-many association). Off-topic: In my app only ...
mate's user avatar
  • 126
1 vote
1 answer
200 views

Understanding StimulusJS connect() vs initialize() in context of turbo/hotwire

The Stimulus handbook describes the difference between connect/initialize as: initialize(): Invoked only once, when the controller is first instantiated connect(): Invoked anytime the controller is ...
APysnack's user avatar
  • 103
0 votes
0 answers
72 views

Configuring flatpickr in Rails7 using simple_form

I'm trying to add to my app date-time picker using flatpickr and simple_form. I tried configure it according to https://github.com/zokioki/flatpickr-rails but with no efect. It seems that simple_form ...
mila002's user avatar
  • 375
1 vote
0 answers
86 views

Rails: When adding a new enum column to my Postgres DB, why do I have to use change_table (not add_column) in my migration? And is it equally safe?

All the examples of adding a new enum column, which Rails 7 supports, require a change_table to add the column, like: def up create_enum :status, ["draft", "published", "...
melanie's user avatar
  • 627
1 vote
0 answers
43 views

activeadmin with rails 7 bad behavior

I tried to upgrade from rails 6 to 7 and I faced unexpected behavoir from activeadmin configuration active_admin.rb file config.on_unauthorized_access = :access_denied config.namespace :admin do |...
Areej Nour's user avatar
0 votes
1 answer
60 views

can we get all tweets of the user from twitter using x gem rails

I am new to this rails community. Lately I am working on sceanrio for my side project where, I need to fetch tweets from twitter of particular user using Rails. I have came down to these repo for ...
000723-weict's user avatar
0 votes
1 answer
48 views

Error encountering upon executing CLI "gem install rails"

I'm newbie on ROR. trying to set up a local development and study. I already have ruby dev kit which i install from rubyinstaller.org (Ruby+Devkit 3.2.3-1 (x64)) here is my ruby version -> ruby 3.2....
Poor programmer's user avatar
0 votes
1 answer
185 views

ruby on rails 7.1.x law sql comment "loading for pp"

From version 7.1.0.beta1, some comment have added in raw sql statement. irb(main):002> Rails::VERSION::STRING => "7.1.0.beta1" irb(main):003> Product.limit(2) Product Load (0.1ms) ...
chobo's user avatar
  • 4,832
0 votes
1 answer
13 views

Pointing gem source in new Rails app project

I'm trying to run new Rails 7 app project in offline environment. I have configured npm, yarn, nvm and gem artifactory remote repositories. I have specified in .gemrc file the sources values pointing ...
mila002's user avatar
  • 375
0 votes
1 answer
54 views

Set default request as TURBO_STREAM in rails 7

I have a newly created Rails 7 application, in that application, I am using form_with, link_to, and button_to and all these tags are sending the request as HTML, I want it to be processed as a ...
Yash's user avatar
  • 13
5 votes
1 answer
150 views

Rails 7 way of auto-loading methods into controllers via engine

I'm looking into updating one of my favorite CMSs to Rails 7 that have been archived on github (PushType). Only I haven't coded Rails since Rails 6. Apparently, something about autoloading methods ...
Michael K Madison's user avatar
1 vote
1 answer
51 views

Hamburger Menu Goes Down, But Not Up

I am using Ruby on Rails 7. Bootstrap 5. My hamburger menu will open, but will not close. All other dropdowns work fine. Here is my code: <nav class="navbar navbar-expand-lg bg-dark border-...
Monroe Mann's user avatar
1 vote
2 answers
121 views

link_to in rails with method :delete still performs GET request "Rails 7.1.3.2" [closed]

I wanted to run a delete method from the device authentication gem I tried both <%= link_to "Sign Out", destroy_user_session_path, method: :delete %> and <%= link_to "...
Adam's user avatar
  • 39
0 votes
0 answers
86 views

How to scroll to the start of the list on Turbo with Stimulus when submitting a form?

I have a Rails 7.1 application with Hotwire. I have a horizontal list that is wrapped in CSS overflow-y: auto and scroll-snap-type: x mandatory. This horizontal list is a simple render that is wrapped ...
Colibri's user avatar
  • 1,145

15 30 50 per page
1 2 3
4
5
68