Masthash

#rails

Ruby Weekly
22 hours ago

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

#programming #rails #ruby #webdev

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.

leblancfg
1 day ago

1 month ago: Arg #implicit imports in #Ruby will be the death of me!

Now, in a vanilla #Rails codebase: Huh, this is kinda handy.

Ernesto
1 day ago

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

#Webinar #Security #CISO #Rails #RubySec

Ernesto
1 day ago

🧩 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

Brian Kephart
3 days ago

Still wishing #rails had merged that PR to enable Active Storage variants for non-image files.

Ruby Weekly
3 days ago
Mandar Vaze (desipenguin)
3 days ago

Learn the Language before the framework

- #python before #django
- #ruby before #rails

https://microblog.desipenguin.com/post/language-before-framework/

Matthew Ford :bitzesty:
3 days ago

🔍 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/

#opensearch #ruby #rails #search

achris
3 days ago

Any advice for a good documentation or book to study how Ruby on Rails works under the hood and the best way to use it? #ruby #ror #rails

Aaron
3 days ago

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:

Esparta :ruby:
4 days ago

@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.

PHP Weekly
4 days ago

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

#laravel #php #programming #rails #ruby #webdev

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

Ivan Moscoso
5 days ago

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.

GitHub list of languages used in project:

Ruby
61.3%
 
HTML
31.8%
 
Go
3.1%

JavaScript
2.9%
 
Dockerfile
0.4%

CSS
0.2%
 
Other
0.3%
Ruby Weekly
5 days ago
Ruby Weekly
5 days ago

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

#programming #rails #ruby #webdev

Ernesto
6 days ago

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.

https://www.indierails.com/9

#Rails #Podcast

Camilo
6 days ago

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?

Ruby Weekly
6 days ago

📣 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

#programming #rails #ruby #webdev

Simmon Li (he/him)
1 week ago

I am really enjoying leaning into Turbo and Hotwire.

My one blindspot is still how I can trigger or receive/process Turbo stream messages via Stimulus controllers.

Anyone have any resources on this specifically?

#ruby #rails #turbo #hotwire #hotrails

Mike Dalessio
1 week ago

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.

#rails #html5

Justin Searls
1 week ago

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/

Test Double
1 week ago

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

masukomi
1 week ago

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.

Pito Salas
1 week ago

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

Ernesto
1 week ago

Tired of dealing with unexpected bugs that disrupt your product roadmap?

If you’re tired of postponing your #TechDebt remediation, check out our new service:

Fixed-Cost, Monthly Maintenance Services for #Ruby and #Rails applications 🚀

https://go.fastruby.io/jsp

Pierre-Adrien
1 week ago

Spent 2h today upgrading an old side-project to #rails 7 and #ruby 3.2 🚀 struggled with RSpec not loading fixtures for some reason, but I got it to work.

Also the new assets building and delivery solutions are hard to grasp but luckily, this project ships almost no JS 😅

Vincent Biret
1 week ago

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!

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.

masukomi
2 weeks ago

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.

a screenshot of the controller
a screenshot of the debugger stopped at a breakpoint.
a screenshot of the routes.
jbz :catjam:
2 weeks ago

🚇 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

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.

Mike Dalessio
2 weeks ago

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. 🤞

#rails #html5

Tyler Willingham
2 weeks ago

Im starting a new position as a Staff Engineer at Parachute Health starting next week 🎉 Thanks for the support #ruby and #rails communities ❤️

Ruby Weekly
2 weeks ago

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

#programming #rails #ruby #webdev

Ruby Weekly
2 weeks ago
Sam Rose
2 weeks ago

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?

#ruby #rails

Collin Donnell
3 weeks ago

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.

Ernesto
3 weeks ago

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?

🤓🤣🚀

#UpgradeRails #Rails