Jeremy

@notgrm@ruby.social
62 Followers
89 Following
291 Posts

Father, Husband, I do Ruby at work with pleasure and passion for @Nextory.

Sometimes I blog about programming also on https://blog.notgrm.dev/ otherwise I may be out to run 🏃‍♂️

Homepagehttps://notgrm.dev
Bloghttps://blog.notgrm.dev
Githubhttps://github.com/NotGrm

New blog post!

Rails Dashboards that scale with SQL and `dry-struct`

Crunch data with SQL, return JSON, wrap it in type-safe DryStructs, and swap in Faker or plug into a data warehouse.

https://pcreux.com/2025/07/09/rails-dashboards-with-sql-and-dry-struct

Rails Dashboards with SQL and dry-struct - Philippe Creux

Rails Dashboards that scale: crunch data with SQL, return JSON, wrap it in type-safe DryStructs, and swap in Faker or plug into a data warehouse.

Good Morning @railsconf! Let's make the final one a blast!

#railsconf #railsconf2025

Do I know anyone working at #Gitlab? I recently apply for a backend position and was rejected.

I'm fine with that (it's life) but I'm curious to have some reasons because I believe that I match the expectations

Today I learn that it is possible to call Ruby's lambdas using the triple equal operator.

I use this capacity to create nice one liners without redundant `.call`

#Ruby #til #DevTips

@marcoroth I still have a bunch that remains to open; sorry for the spam tho 😆

Next step will be to contribute 💪

@marcoroth glad that you like my idea, I will try to open issues to support each of the a11y supported linter rules on Herb repo

@marcoroth that may represent a lot, but I would appreciate linter rules to enforce accessibility good practices would be helpful.

It’s something that I appreciated a lot when working on EmberJS projects to be guided on the a11y path

https://github.com/ember-template-lint/ember-template-lint

GitHub - ember-template-lint/ember-template-lint: Linter for Ember or Handlebars templates

Linter for Ember or Handlebars templates. Contribute to ember-template-lint/ember-template-lint development by creating an account on GitHub.

GitHub

« On a décidé de mettre un terme à ta période d’essai »

Et sinon elle se passe bien votre journée vous ? 😖

As a next step for Herb, I'm happy to announce the release of the Herb Language Server and VS Code extension.

Built on top of Herb's HTML-aware ERB parser to bring diagnostics, instant feedback, and structural awareness to HTML+ERB files.

Still early, but a solid first step towards better HTML+ERB tooling. Feedback is very welcome!

Use Signal. We promise, no AI clutter, and no surveillance ads, whatever the rest of the industry does. <3
×

Today I learn that it is possible to call Ruby's lambdas using the triple equal operator.

I use this capacity to create nice one liners without redundant `.call`

#Ruby #til #DevTips

@notgrm I would not recommend doing this. It might work, but it's very confusing.

I generally think you shouldn't use === directly, only as part of a case expression (where this behaviour makes more sense).

Another option is also to use [], like missing_or_wildcard[filters[:country]].

Although in this case I'd usually just break out missing_or_wildcard into a method, so you can write the most obvious code.

As a more crazy option, you can do something like this to avoid needing the helper at all, by factoring out the whole loop:

base_scope.where([:country, :recipient, :sender].index_with { filters[it] unless filters[it].in?(['*', nil]) }.compact)

I've left it in one line for ease of tooting, but obviously you could break it out more.

@notgrm Filter parameters tend to bring a lot of boilerplate. It’s why I created Filterameter.

https://rockridgesolutions.com/posts/filterameter

Filterameter: Simplify and Speed Up Development of Rails Controllers

Handling filter parameters for index endpoints in Rails controllers can often be a repetitive and error-prone task. The Filterameter gem aims to simplify this process by providing a declarative way to define search filters. In this post, we’ll explore how Filterameter can help you write cleaner and more maintainable code.

Rockridge Solutions

@notgrm

That feature is useful because #=== allows lambdas to be used as conditions in case statements.

But worth noting that the #[] is probably better as a generic call shorthand.

Example:

```
is_even = ->(x) { x.even? }
is_even[2] #=> true
```

Good info, I'm going to try it to see how it works.