Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
0 votes
1 answer
138 views

I have a bleeding edge Rails project (8.1) using the splendid View Components. I've made an image-modal component, triggered from a plain HTML anchor and that toggles visibility on a HTML dialog (...
1 vote
1 answer
52 views

Good morning everyone. I'm trying to render a FlashMessage component <% flash.each do |type, message| %> <%= render FlashMessageComponent.new(type: type, message: message) %&...
0 votes
0 answers
168 views

In the application, when creating a feature, it was necessary to add hotwired/turbo-rails. // app/javascript/application.js import "@hotwired/turbo-rails" import "controllers" ...
0 votes
1 answer
39 views

My app implements plugin system (razor libraries). App is using razor runtime compilation. Razor library contains few ViewComponents with custom structure described below. Razor library structure: ...
2 votes
1 answer
939 views

We are currently in the process of moving over our app from Vue.js to hotwire. We are just experiencing a very weird bug when using turbo_frames and ViewComponents. We have a turbo_frame_tag for a ...
1 vote
2 answers
425 views

I have followed this post https://reinteractive.com/articles/how-to-create-flash-messages-in-Rails-7 to add nice flash messages with tailwind, which got me into View Components. Everything works apart ...
1 vote
1 answer
309 views

Hoping you're having a good day. So, i have this weird bug that's been kicking my ass and i'm not sure where it is located for the love of God. I have a ViewComponent that is rendered normally inside ...
0 votes
0 answers
86 views

If a partial is rendered, and receives 2 local variables "name" and "environment": # arbitrary show view <%= render partial: "sports_team/details_and_performance", ...
1 vote
2 answers
237 views

I'm developing a gem that acts as a library of view components integrated with Tailwind CSS. In this project, there's a crucial tailwind.config.js file where I specify the paths for building the tags ...
0 votes
0 answers
288 views

I'm editing a feature that renders a ViewComponent. After the ViewComponent is rendered, it's passed a block, which is the component itself render SomeComponent.new(arg: foo) do |component| ...
0 votes
1 answer
44 views

This is the situation in view components: app/components/appointments/new_appointment_component.haml = form_with(model: @appointment, url: appointments_path, method: :post) do |f| = f.hidden_field :...
0 votes
1 answer
249 views

I have a card component that when clicked, takes you to a different route in the application. The component is built using Rails ViewComponents. What is the best way to write tests that ensure when a ...
user avatar
1 vote
1 answer
1k views

I have a SectionComponent Class as follow : class SectionComponent < ViewComponent::Base def initialize(..) ... end end And a matching section_component.html.erb file. It works perfectly ...
0 votes
1 answer
447 views

I am using view component in rails project. I want use translation from my parent inside a child. For now, I have this: components └─ a ├─ component.rb ├─ component.html.erb ├─ component.yml ...
1 vote
1 answer
353 views

I have a component that uses slots, which I managed to figure out how to render in a preview. I know that in a test environment, it's possible to use with_request_url to specify a particular request ...

15 30 50 per page
1
2 3 4

AltStyle によって変換されたページ (->オリジナル) /