Alvin Crespoalvincrespo.hashnode.dev·Aug 13, 2024Testing ViewComponent w/ CapybaraToday I was writing some tests and dug into a little bit of ViewComponent and Capybara. Most of time you read a tutorial and just kind of get whatever done, here I'm going to explain in detail what my test is doing and why it's important. 💡 If you'...Discusstrix-editor
Andrew Fosterandrewfoster.hashnode.dev·Aug 30, 2022Calendar component using ViewComponent and HotwireTailwindUI has a nice looking calendar component I can use for this task. Here is what it will look like: And here is the component in action being used to set a value for a date input: https://www.loom.com/share/5aba00620a15484baa3f7a6fb08f617d Let...Discuss·1 like·761 readsLearn MoreRuby on Rails
Andrew Fosterandrewfoster.hashnode.dev·Jun 30, 2022Modal for Adding RecordsAt the moment the only way to add new records is using the scaffolded "New" page. Not only is it pretty uninspiring to look at it, using it means navigating away from the index page to do so. Instead I'll let users add records directly from the inde...Discuss·72 readsRails 7 ApplicationRuby on Rails
Andrew Fosterandrewfoster.hashnode.dev·Jun 23, 2022Filtering and Sorting with RansackAt the moment the index pages for the application show all available records and have no way to filter, search or sort at all. In this blog I'll tackle the filtering and sorting aspects with a tool I have used before called Ransack. I have not seen a...Discuss·1 like·2.1K readsRails 7 ApplicationRuby on Rails
Andrew Fosterandrewfoster.hashnode.dev·Jun 20, 2022Encapsulating the UI with ViewComponent + StorybookSo far the user interface for my application has been built using a combination of views (including partial views) and helper methods. An alternative exists called ViewComponent. This is a way of encapsulating a single user interface element into a r...Discuss·302 readsRails 7 ApplicationRuby on Rails