#rails
GitHub - keygen-sh/typed_params: Define structured and strongly-typed parameter schemas for your Rails controllers
https://github.com/keygen-sh/typed_params
Discussions: https://discu.eu/q/https://github.com/keygen-sh/typed_params
While #commuting on #subways, #buses, or #rails, #NewYorkers will see #Pride #posters and #decals proudly on display. The heart-shaped #stickers are plastered on the outside of 50 #subwaycars that run along the 1, A, L, and 7 lines through #Manhattan, #Brooklyn, #Queens, and #TheBronx. The #stickers will also appear on 50 #MetroNorth #cars, 50 #LIRR cars, and 50 #BridgesandTunnelsMaintenance cars.
I hope you can join us on Monday June 12th at 12pm ET! 📅
I know many would benefit from the content discussed in this session, and we look forward to answering all your questions.
SAVE YOUR SPOT over here 👉🏼 https://ombulabs.zoom.us/webinar/register/8016857349319/WN_8iJA29KBQjqfZEXqkKRnxA#/registration
🧩 Common issues when writing #Rails / #ActiveRecord code that could be a potential attack vector
🛠️ Tools you can use today to check what code or dependencies in your app could be exploited
Using postgres advisory locks to avoid race conditions in Rails
https://firehydrant.com/blog/using-advisory-locks-to-avoid-race-conditions-in-rails/
Discussions: https://discu.eu/q/https://firehydrant.com/blog/using-advisory-locks-to-avoid-race-conditions-in-rails/
Still wishing #rails had merged that PR to enable Active Storage variants for non-image files.
Are you absolutely sure your `has_one` association really has one association?
https://thoughtbot.com/blog/rails-has-one-limitations
Discussions: https://discu.eu/q/https://thoughtbot.com/blog/rails-has-one-limitations
Learn the Language before the framework
- #python before #django
- #ruby before #rails
https://microblog.desipenguin.com/post/language-before-framework/
🔍 Improving the Search Experience with OpenSearch (ElasticSearch)
We recently helped the Trussell Trust transition from MySQL to OpenSearch, an open-source, scalable, and flexible alternative to ElasticSearch.
🚀 The result? A 5 to 10 times increase in search performance, reduced load on the application and database, and a smoother user experience.
🔗 Full story: https://bitzesty.com/2023/03/05/improving-the-search-experience-with-opensearch-elasticsearch/
As a solo dev on a sizable #rails project, I *CANNOT* emphasize enough how critically important a solid test suite is.
I'm preparing to roll out a pretty awesome new feature and there's a little bit of collision with an existing feature and my test suite, while not perfect, definitely found 3 bazillion bugs that would definitely have leaked into prod. (They were sneaky ones!)
This app has a lot of random permutations possible so I have several testing strategies:
@redknitin @hejsna ohh I didn't mean to imply that #memcached is dead, sorry if that was the perception.
The rationale was more about what was supported out of the box by #rails 15 years ago, which was Memcached. That derived to #heroku having #Redis more on #sidekiq and Memcached to Rails cache server. When Rails added support for Redis (6 years ago) more people went for Redis to be the cache layer, but it seems like Heroku didn't follow along.
Yes, Memcached is still a good caching option.
Eyeloupe - The elegant Rails debug assistant (inspired by Laravel Telescope)
https://github.com/alxlion/eyeloupe
Discussions: https://discu.eu/q/https://github.com/alxlion/eyeloupe
no sé si realmente las aplicaciones #ruby / #rails son demasiado complicadas de configurar, o yo nomás no les termino de agarrar la onda.
Hoy es #consulDemocracy. A veces quisiera que _cada_ proyecto no asumiera una configuración super específica de todo, y que ofrecieran las partes con defaults sensibles y con la menos instrumentación posible, para que uno pueda construir desde ahí.
Ahh pero no, seguro tu también usas su sistema de despliegue y configuraciones super específicas
I was curious about the breakout of languages for #EveryPost (I’m guessing the 0.3% is yaml?)
I’m happy with only 3% being #golang — not a lot of code but addresses an important aspect of link search better done outside #Rails.

New gem to construct row value queries in Rails
https://github.com/odydoum/where_row
Discussions: https://discu.eu/q/https://github.com/odydoum/where_row
How can I use accepts_nested_attributes_for & fields_for with a public_id/slug instead of the DB PK
https://github.com/rails/rails/pull/48390
Discussions: https://discu.eu/q/https://github.com/rails/rails/pull/48390
It was a pleasure being a guest in the IndieRails podcast. Thanks to
@jeremysmithco and Jess Brown for having me! ❤️
Always happy to share my journey with @OmbuLabs,
@FastRuby, and
@UpgradeJS.
We've come a long way since I started freelancing.
All right, StandardRb v1.29.0 is up and out!
A whole host of rules enabled to simplify your life and reduce code redundancy, like array constructors with arrays in them! regex constructors with regex in them! kablow! gone!
Standard-performance is now up to date with rubocop-performance as well, so enjoy those bugfixes.
🔗 https://rubygems.org/gems/standard/versions/1.29.0
#Ruby #Rails #RubyOnRails #StandardRails #RuboCop
Here is an exciting #Rails question.
You have a form with a dropdown. The dropdown allows you to select many values, and we have scoped those values to your role. How should Rails handle an invalid submission?
If, for some reason, you submit a value outside of your scope, what should the application do? Should it return a validation message? Should it exclude the offending value from the request? Is there a third option?
📣 This week in Rails is out: HTML5 sanitizer enhancements for Action View, cleaner and more efficient routing with “path_params”, and more!
https://world.hey.com/this.week.in.rails/html5-sanitizer-path_params-and-more-484b0376
Discussions: https://discu.eu/q/https://world.hey.com/this.week.in.rails/html5-sanitizer-path_params-and-more-484b0376
"Efficient IN operator queries" in #Rails at Gitlab
https://docs.gitlab.com/ee/development/database/efficient_in_operator_queries.html
Rebuilding Concurrent Ruby: ScheduledTask, Event, and TimerSet
https://island94.org/2023/06/rebuilding-concurrent-ruby-scheduledtask-event-and-timerset
Discussions: https://discu.eu/q/https://island94.org/2023/06/rebuilding-concurrent-ruby-scheduledtask-event-and-timerset
Shaping Rails to Your Needs, Customizing Rails Generators using Thor Templates
https://blog.saeloun.com/2023/05/31/customizing-rails-generators-using-thor-templates/
Discussions: https://discu.eu/q/https://blog.saeloun.com/2023/05/31/customizing-rails-generators-using-thor-templates/
HTML5 Sanitizers have been merged upstream and will be in Rails 7.1!
https://github.com/rails/rails/pull/48293
Wondering if I should try to give a talk on this journey.
The video of my most recent #RailsConf presentation is now live!
It was definitely one of the most creative and unusual sessions we've done before. Has given me some ideas of new ways to engage an in-person audience while still conveying meaningful messages #ruby #rails https://blog.testdouble.com/talks/2023-05-30-lets-standardize-rails/
At RailsConf 2023, we conducted an experiment: could attendees do the hard work for us by voting on RuboCop rules so we could publish the Standard Rails plugin? Find out how we crowdsourced the toughest debates once and for all, saving your (and every other) team the time of having to do it all over again.
https://link.testdouble.com/lets-standardize-rails-once-and-for-all
#Ruby #Rails #StandardRails #RuboCop
we've got pretty good test coverage on the codebase at work (dunno enough yet to say great) but holy 💩 does it take forever to run. Like multiple hours (literally). I think it's like 20 mins parallelized on the CI, and yes i know i can parallelize it locally too. but still.... UGH
#Rails is WAY too reliant on hitting the DB during tests.
Link blog entry for "pawurb/rails-brotli-cache: Rails cache using the Brotli algorithm offers better compression and performance.": Rails cache using the Brotli algorithm offers better compression and performance. - GitHub - pawurb/rails-brotli-cache: Rails cache using the Brotli algorithm offers better compression and performa... (https://github.com/pawurb/rails-brotli-cache)
#rails, performance, cache, compression, cooltool

Short Ruby News - edition 44 covering week 21 of 2023
https://newsletter.shortruby.com/p/edition-44
Discussions: https://discu.eu/q/https://newsletter.shortruby.com/p/edition-44
Extract Sample Rate of an Audio File with Audio Analyzer in Rails 7.1
https://blog.saeloun.com/2023/05/29/extract-sample-rate-of-audio-from-audio-analyzer/
Discussions: https://discu.eu/q/https://blog.saeloun.com/2023/05/29/extract-sample-rate-of-audio-from-audio-analyzer/
Implementing Application Layer Encryption in Ruby on Rails applications with Asherah
this JS ain't right
https://www.ducktypelabs.com/this/
Discussions: https://discu.eu/q/https://www.ducktypelabs.com/this/
This is where I get off the #rails, maybe part of the solution would be a #lobbying group that provides studies, talking points, endorsements during #elections and keeps private actors and politicians accountable? We could name it tchou-tchoo to meet language requirements? 🤣 What do you think? Thanks for reading!
Efficient JSON Serialization with Blueprinter for Ruby on Rails
https://ruby.mobidev.biz/posts/efficient-json-serialization-with-blueprinter-for-ruby-on-rails/
Discussions: https://discu.eu/q/https://ruby.mobidev.biz/posts/efficient-json-serialization-with-blueprinter-for-ruby-on-rails/
Anyone read Agile Web Development with Rails?
https://pragprog.com/titles/rails7/agile-web-development-with-rails-7/
Discussions: https://discu.eu/q/https://pragprog.com/titles/rails7/agile-web-development-with-rails-7/
Learn Hotwire by building the simplest possible Hotwire and Ruby on Rails app
https://monn.app/blog/the-simplest-ruby-on-rails-and-hotwire-app-possible-beginners-guide
Discussions: https://discu.eu/q/https://monn.app/blog/the-simplest-ruby-on-rails-and-hotwire-app-possible-beginners-guide
A Beginner's Guide to Rails Parameters
https://www.akshaykhot.com/rails-parameters/
Discussions: https://discu.eu/q/https://www.akshaykhot.com/rails-parameters/
How to Access Native Android Features with the JavaScript Bridge
This Week in Rails - 2023-05-26
https://www.youtube.com/watch?v=aiPw-5tZCWE
Discussions: https://discu.eu/q/https://www.youtube.com/watch?v=aiPw-5tZCWE
Design Patterns Series: Command Design Pattern in Ruby/Rails
https://gurzu.com/blog/command-design-pattern-in-ruby
Discussions: https://discu.eu/q/https://gurzu.com/blog/command-design-pattern-in-ruby
10 Popular Design Patterns for Ruby on Rails
https://scoutapm.com/blog/rails-design-patterns
Discussions: https://discu.eu/q/https://scoutapm.com/blog/rails-design-patterns
Infer name with link_to - Rails Tricks Issue 8
https://greg.molnar.io/blog/rails-tricks-issue-8/
Discussions: https://discu.eu/q/https://greg.molnar.io/blog/rails-tricks-issue-8/
Well, #Piikup is now live taking delivery orders for two local restaurants!
Next step is to monitor order-flow; and beautify the UI!
If you are a #Ruby, #Rails, #CSS, #StimulusJS, or #HTML Developer and want to help build out worker-and-community-owned #Cooperative alternatives to extractive web services; hit me up!
We offer weekly ensembles helping people get up to speed on #Convene on Wednesdays and every other Sunday.
A #ruby on #Rails mystery in 3 images. Solution in 🧵
controller has 2 actions, which i've called `first_action` and `second_action` just to distinguish them.
Rails will ALWAYS send you to `first_action` even when the route, and the `action_name` are `second_action`.
images: controller, debugger at breakpoint, routes
I stared at this for SO long before i figured it out while rubber-ducking it.
My first rails app
https://github.com/rcbt17/rails-watch-list
Discussions: https://discu.eu/q/https://github.com/rcbt17/rails-watch-list
🚇 Introduction to Rails Engines
➥ @FastRuby
"Rails Engines are essentially mini-applications that can be plugged into a larger Rails application. They allow you to modularize your code and keep it separate from the core application. This makes it easier to maintain and update the codebase as a whole."
#DesignPattern #Rails #Ruby
https://www.fastruby.io/blog/introduction-to-rails-engines.html
Rails 7.0.5 has been released
https://rubyonrails.org/2023/5/24/Rails-7-0-5-has-been-released
Discussions: https://discu.eu/q/https://rubyonrails.org/2023/5/24/Rails-7-0-5-has-been-released
The folder that I hate most in #rails projects is /app/services folder. It is often just a dump for smart asses who like to write classes with a `perform` or `call` method. Probably they've heard that it is a better pattern than overloading the Model or Controller. Which might very much be an issue, but not if you make such a mess of how you implement services. I prefer fat models and controllers with small methods over ill indirection.
Holy forking shirtballs! I finally opened a PR to Rails for HTML5 sanitizer support.
https://github.com/rails/rails/pull/48293
This is the last significant step in a three-year yak shave to upgrade the entire Rails sanitization stack to be HTML5 standards-compliant.
Gonna crack open a beverage and watch CI run. 🤞
This week we're talking about Stimulus with Marco Roth
https://open.substack.com/pub/onceamaintainer/p/once-a-maintainer-marco-roth?r=2773u5
Discussions: https://discu.eu/q/https://open.substack.com/pub/onceamaintainer/p/once-a-maintainer-marco-roth?r=2773u5
New Launch! Fixed-cost, Monthly Maintenance Services by @FastRuby
🚀
The Rails Doctrine
https://rubyonrails.org/doctrine
Discussions: https://discu.eu/q/https://rubyonrails.org/doctrine
rails-brotli-cache - Drop-in enhancement for Rails cache, better performance and compression with Brotli algorithm
https://github.com/pawurb/rails-brotli-cache
Discussions: https://discu.eu/q/https://github.com/pawurb/rails-brotli-cache
Creating Secure Tunnels in Ruby on Rails with Ngrok
Discussions: https://discu.eu/q/https://youtu.be/jWixLZgzOHM
I’ve heard Rails is still really good in 2023. Haven’t really touched it since 2019 and even then it was mostly migrating an existing Rails 4 codebase to Rails 5.
I’m following some random Rails 7 Hotwire tutorial and the first thing I’m stumbling on is the almost complete lack of IntelliSense. I’ve tried a bunch of things and Shopfiy’s Ruby-lsp gets some of the way there, but seems to not know anything about Rails.
What am I missing?
I guess this is the same instinct that keeps me from using service objects in #Rails apps. That pattern just seems to give you some really gross code to organize things in ways that Rails gives us better tools for without.
Understanding Rails Concerns: What, Why, and How
https://www.akshaykhot.com/how-rails-concerns-work-and-how-to-use-them/
Discussions: https://discu.eu/q/https://www.akshaykhot.com/how-rails-concerns-work-and-how-to-use-them/
How to Fix the Rails 6.1 Relation `Merge` Deprecation (due to new behavior in Rails 7.0)
https://www.fastruby.io/blog/rails/upgrades/rails-merge-deprecation.html
Discussions: https://discu.eu/q/https://www.fastruby.io/blog/rails/upgrades/rails-merge-deprecation.html
In spite of all that and specializing in something so niche, we still have to answer random questions like:
- Why should we trust you guys instead of an intern?
- Why are your rates so expensive?
- Can you upgrade my Rails 2.3 app in a month?
🤓🤣🚀