JRuby's activerecord-jdbc-adapter doesn't yet support ActiveRecord 8. How should a gem which depends on ActiveRecord try to best support both CRuby and JRuby?
https://rubygems.org/gems/activerecord-jdbc-adapter/versions/71.0-java
JRuby's activerecord-jdbc-adapter doesn't yet support ActiveRecord 8. How should a gem which depends on ActiveRecord try to best support both CRuby and JRuby?
https://rubygems.org/gems/activerecord-jdbc-adapter/versions/71.0-java
Now we got Jess Sullivan with her talk "ActiveRecord Unveiled: Mastering Rails' ORM"
#HelveticRuby #HelveticRuby2025
#rubycommunity #rubyconferences #rubyconference #ruby #rails #rubyonrails #geneva #switzerland #schweiz #genf #RubyProgramming #activerecord #database #databases #activestorage #orm #objectrelationalmappers #carrierwave #carrierwaveuploader
Shardines: SQLite3 Database-per-Tenant with ActiveRecord
https://blog.julik.nl/2025/04/a-can-of-shardines
#HackerNews #Shardines #SQLite3 #ActiveRecord #DatabasePerTenant #HackerNews
Wide Models and Active Record custom validation contexts, by @bensheldon
https://island94.org/2025/04/wide-models-and-active-record-custom-validation-contexts
> This post is a brief description of a pattern I use a lot using when building features in Ruby on Rails apps and that I think needed a name:
> Wide Models have many attributes (columns in the database) that are updated in multiple places in the application, but not always all at once i.e. different forms will update different subsets of attributes on the same model.
How fast can an ActiveRecord SQL query run?, by Fritz Meissner
https://thoughtbot.com/blog/how-fast-can-an-activerecord-sql-query-run
> Your database monitoring (perhaps Amazon RDS performance insights, Skylight, or the #Postgres pg_stat_activity view) is telling you that one particular query in your Rails app is causing heavy load. Unfortunately, it already seems pretty fast. What are the odds that you can get it to run any faster?
It's always great to see @rosa and she talked about her #SolidQueue implementation at #rubycommunityconference in #krakow.
She also gave a shout-out to @bensheldon's #goodjob and mentioned how @getajobmike's @sidekiq is blazingly fast.
#ruby #rails #queue #rubyonrails #activerecord #poland #37signals #backgroundprocessing #backgroundprocesses #sidekiq
New from Julie Kent:
Imaging you have a Rails endpoint that has slow queries AND performs third-party HTTP requests. With Rails async queries, you can perform these operations in parallel—without being an expert in multithreading. 🚀
https://www.honeybadger.io/blog/rails-async-queries/?utm_source=mastodon&utm_medium=social
I know #SQLite3 supports #SQL comments in newer versions with the right flags, but `rails g` for #ActiveRecord ďoesn’t seem to support them except in #PostgreSQL or #MySQL / #MariaDB. Is there a workaround?
Made a gem out of an earlier proof-of-concept: https://github.com/henrik/activemodel-with_conditions
This lets you do things like
``` ruby
with_conditions(if: :feature_x_is_on?) do
validate :free_plans_must_have_x, if: :free_plan?
end
```
where the conditions merge intuitively, unlike `with_options`.
【Rails】エラー「ArgumentError: Relation passed to #or must be structurally compatible. 」とorメソッドについて
https://qiita.com/k12da/items/f06f99977bca35aaa892?utm_campaign=popular_items&utm_medium=feed&utm_source=popular_items
ok, #Rails #ActiveRecord thing:
Some people upgrading to Mastodon 4.3.0 seem to have messed up their migration relating to Active Record Encryption, by changing the secrets at some point after they first used them.
Of course since the keys have changed, the encrypted columns are irrevocably lost, and nothing can be done about that. But is there something we can do to lessen the risks of people running into that by catching the issue earlier?
Also, even overwriting those attributes is not possible in normal Rails code because save!
ing will call attribute_changed?
which will in turn try to decrypt the value to compare it, and raise an exception. Is there a way we can better handle columns that fail to decrypt when we are just interested in overriding them?
Am I the only one that dont like other ORMs than Rails Active Record? I mean, FastAPI's SQLAlchemy, SQLModel in combination with pydantic as well as Symfonys Doctrine feels a little bit pain in the a** when it comes to complex relations. Active Record just feels smooth compared to the other ones...
#rubyonrails #activerecord #fastapi #sqlalchemy #sqlmodel #pydantic #doctrine #symfony #python #orm #database
assert_raise(ActiveRecord::RecordNotFound)で沼った件
https://qiita.com/taka_2525/items/130bbaa2a276e9e4cce5?utm_campaign=popular_items&utm_medium=feed&utm_source=popular_items
Eradicating N+1s: The Two-phase Data Load and Render Pattern in Go, by @brandur
> Using a two-phase data load and render pattern to prevent N+1 queries in a generalized way. Especially useful in Go, but applicable in any language.
ActiveRecord::Relation#order Adds Support For Hash Values In Rails 7.2.
https://blog.saeloun.com/2024/05/31/rails-7-2-activerecord-order-adds-support-for-hash-values/
Today I used generated columns in SQL for the first time. These are computed columns that are updated on write and can be indexed. They work with PostgreSQL, MySQL and even SQLite.
Adding a migration via the Sequel gem was pretty straight forward. ActiveRecord has also built-in support for generated columns.
Here is a great overview about this: https://medium.com/the-table-sql-and-devtalk/the-ultimate-guide-to-sql-generated-columns-99a25ba33c39
Why is ActiveRecord > 7.1 still broken on JRuby? Appears activerecord-jdbc-adapter still hasn't been updated.
https://github.com/ronin-rb/ronin-db-activerecord/actions/runs/9264533331/job/25484805001
#activerecord #jruby