#Rails
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.
New blog post on animating modals in #rails using Hotwire, Turbo Frames and Tailwind: https://jmd.fm/animating-hotwire-powered-modals-with-stimulus-and-tailwind/
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
Custom Credentials in Your Rails App — Replacing .env with Rails credentials
https://monn.app/blog/custom-credentials-in-your-rails-app
Discussions: https://discu.eu/q/https://monn.app/blog/custom-credentials-in-your-rails-app
007: Rails 7.0.5 released! Rails World CFP open, ticket landing page available.
https://www.railschangelog.com/7
Discussions: https://discu.eu/q/https://www.railschangelog.com/7
@albertcardona As is plain to see, #Spain and #Portugal are absent from this network... :blobbroken:
Ruby on Rails 7.0.5 is now available!
https://github.com/rails/rails/releases/tag/v7.0.5
Discussions: https://discu.eu/q/https://github.com/rails/rails/releases/tag/v7.0.5
ICYMI: 🚨New pod alert!
OmbuLabs | The Lean Software Boutique, JS Upgrade, and FastRuby.io | Rails Upgrade Services CTO, @etagwerker joined the Jason & Bart show to talk all things #Rails, #Node, #React, and how to deliver high quality productized services 🛠️🔥
You’ll want to tune in: https://podcasters.spotify.com/pod/show/thejasonandbartshow/episodes/Ernesto-Tagwerker---Scaling-a-Software-Agency-The-Power-of-Productized-Services-and-Profitable-Growth-Strategies-e22c2uo/a-a9lrgbf 🎧

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
Introduction to Rails Engines (why and when to use them)
https://www.fastruby.io/blog/introduction-to-rails-engines.html
Discussions: https://discu.eu/q/https://www.fastruby.io/blog/introduction-to-rails-engines.html
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.
Controlling access to features based on subscription plan
https://rubygarage.org/blog/separating-features-in-a-multi-tenant-saas-app
Discussions: https://discu.eu/q/https://rubygarage.org/blog/separating-features-in-a-multi-tenant-saas-app
I am working to identify the origin of an ActiveRecord query via ActiveRecord::QueryLogs.
It seems for one this is a request in a erb template, and the view is rendered because of turbo-rails and action-cable behind.
The question now, is where to put the `ActiveSupport::ExecutionContext.set` to get the best information about who did the call and from where.
A first draft that is not correct https://github.com/benoittgt/rails/pull/1/files
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. 🤞
Totally forgot Monday to say that 43 edition of Short Ruby Newsletter is out
In case you missed it, check it out at: https://newsletter.shortruby.com/p/edition-43
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
Decoding Ruby's Time and DateTime: Unveil the mystery surrounding the conversion process and gain insights into the intriguing behavior observed when converting Time to DateTime.
SupeChat #1 Amanda Perino from Rails Foundation about Rails World
https://www.youtube.com/watch?v=AlcfyfBSM2A
Discussions: https://discu.eu/q/https://www.youtube.com/watch?v=AlcfyfBSM2A
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
https://dev.to/amree/introduction-to-ruby-on-rails-and-dockerfile-5a29 - start from the #Ruby base image in #Docker, build up a #Rails base image. Further in the series is docker-compose. Great to see you learning in public https://github.com/amree.

using #redcarpet in my #rails app. Noticed lists nested >2 levels deep automatically get collapsed into a max of 2 deep. It's an issue that's existed since 2013... literally for a decade.
Apparently they won't fix it because letting infinite nesting could be a DDoS exploit. https://github.com/vmg/redcarpet/issues/115#issuecomment-4187069
Fine, but holy eff 2 levels is nothing. Gimme whatever a normal person would use + 1 or two.
【 #Mastodon を構成する技術要素 】
下記記事で勉強中。。。。🤔
https://handon.hatenablog.jp/entry/2018/12/18/004652
(引用)
要素名 ソフトウェア名 概要
web server #nginx HTTP/HTTPSリクエスト処理
web #rails Web処理(通常処理)
streaming #Node.js Web処理(Userstreamのみ)
media #swift 画像やカスタム絵文字の格納
db #postgresql アカウント情報やトゥートの格納
cache #redis キューキャッシュ
job queue #sidekiq ジョブハンドラー

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/
PSA: Don't forget to restart your Rails web server (in development) if you edit `config/initializers/rails_event_store.rb`. I debugged this for an hour before realizing my mistake!
I found this amazing Rails resource by Nikita Voloboev.
https://wiki.nikiv.dev/programming-languages/ruby/rails
Discussions: https://discu.eu/q/https://wiki.nikiv.dev/programming-languages/ruby/rails
Rails 7.1 adds support for responsive images
https://www.shivamchahar.com/posts/rails-7.1-adds-responsive-images
Discussions: https://discu.eu/q/https://www.shivamchahar.com/posts/rails-7.1-adds-responsive-images
#Rails geeks: Are you aware of a plugin that lets you do something akin to "Sparkle" for mac apps? Something that will let me check some resource in the net, see if there's an update available, and then (with user approval) execute whatever needs to be executed to update to the latest?
it's not hard to write, but it seems silly to do so if someone's already done it and debugged it. ;)
Create Custom Flash Types in Rails
https://www.akshaykhot.com/create-custom-flash-types-rails/
Discussions: https://discu.eu/q/https://www.akshaykhot.com/create-custom-flash-types-rails/
Rails 7.1 adds ActiveRecord::Base::normalizes API for attribute values
https://blog.kiprosh.com/rails-7-1-activerecord-adds-normalizes-api/
Discussions: https://discu.eu/q/https://blog.kiprosh.com/rails-7-1-activerecord-adds-normalizes-api/
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?
🤓🤣🚀
Since 2019, @FastRuby has been running the #Rails upgrade workshop at @railsconf (both on-site and remotely)
We love sharing our process and OSS libraries to make it easier for people to DIY their upgrades!
Since January, 2022, we have invested almost 600 developer hours improving the process and internal documentation for the "#Rails upgrade roadmap"
Inline Routes in Rails
https://www.akshaykhot.com/rails-inline-routes/
Discussions: https://discu.eu/q/https://www.akshaykhot.com/rails-inline-routes/
According to BuiltWith Trends, there are 3,825,799 websites that use Ruby on Rails
I also saw quite a few benchmarks and comparison sheets between Elixir and other things.
Isn’t it ironic that Mastodon, which is based on Ruby/Rails, ”famous” for not scaling very well is also the host of ”mega-instances” whereas Pleroma/Akkoma/*oma’s are based on Elixir, famous for scaling incredibly well, is mostly used for small/single-user instances?
Yeah, I understand those terms can be discussed ad infinitum, and that there is good/bad architecture etc. But still. Ironic.
#Elixir #BEAM #Phoenix #Ruby #Rails
Singed, a New Profiler Front-End for Ruby and Rails
https://engineering.gusto.com/singed-a-profiler-front-end-for-ruby-and-rails-applications/
Discussions: https://discu.eu/q/https://engineering.gusto.com/singed-a-profiler-front-end-for-ruby-and-rails-applications/
Rails World Call for Papers now open 🔔
https://rubyonrails.org/2023/5/9/rails-world-call-for-papers-now-open
Discussions: https://discu.eu/q/https://rubyonrails.org/2023/5/9/rails-world-call-for-papers-now-open
Solving a critical bug in the default Rails caching library
https://www.aha.io/engineering/articles/solving-a-critical-bug-in-the-default-rails-caching-library
After working on serverless node microservices for the last 6+ months I have to say... just use #rails. Break this rule if you actually know you need to, not before.
Are you a great #ruby engineer who would like to try sth else than #rails ? Join us in Ascenda, to have some fun with Hanami
tl;dr: It kinda seems like custom transformers were dreamt of at one point, but currently the built-in ImageProcessingTransformer is hardcoded as the only one available.
I opened a discussion for this. I found a PR to make custom file transformers possible that was opened in 2020 but never received attention from the #rails core team. Give it your boost if you'd like, and maybe with a bit of support we can move it along.
https://discuss.rubyonrails.org/t/non-image-file-variants/82817
Anyone out there written custom Active Storage transformers for #rails ? The built-in stuff is all for images, and I need to process audio files.
A bunch of book sales today:
It’s the last day to get 35% off the #pickaxe book with the code RailsConf_Atlanta.
Both Modern Front-End Development for Rails and Modern CSS with Tailwind second editions are 50% off this week with code WEBDEV2023.
All available at https://pragprog.com
My SaaS makes $50K MRR and is built on vanilla Ruby on Rails and jQuery
https://twitter.com/yongfook/status/1653742725882150913
Discussions: https://discu.eu/q/https://twitter.com/yongfook/status/1653742725882150913