shakedown.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
A community for live music fans with roots in the jam scene. Shakedown Social is run by a team of volunteers (led by @clifff and @sethadam1) and funded by donations.

Administered by:

Server stats:

255
active users

#activerecord

0 posts0 participants0 posts today

Lazy ActiveRecord: can you use query class-methods defined in another model from within where() statements when doing deep joins() from a different model?

class Bar < ActiveRecord::Base
def self.with_baz(value)
...
end
end

class Thing < ActiveRecord::Base
def self.bars_with_baz(value)
joins(foo: [:bar]).where(
foo: {
bar: {with_baz: value}
}
)
end
end

When validating the uniqueness of a belongs_to, is it really necessary to use the foreign-key name (ex: :foo_id)? Or will the association name suffice? I'm wondering if `validates :foo_id, uniqueness: ...` is different or equivalent to `validates :foo, uniqueness: ...`, or maybe some legacy cargo culting due to old bugs?
#activerecord

What is the preferred way to setup CI to test ActiveRecord migrations (as well as any raw SQL queries) against sqlite3, postgres, mysql? Apparently I have to setup a "service container" for postgres. How do I shoehorn it into the CI matrix?
gist.github.com/RizkyRajitha/c
#activerecord

GistGitHub action workflow for test , using PostgreSQL database service container . GitHub action workflow for test , using PostgreSQL database service container . - test.yml

okay, it's not just me... the #mongoose #middleware is just really poorly designed. Really frustrating for those of us coming from an #activeRecord world where things are just a lot more mature.

Just wish I hadn't lost the hours I just spent banging my head against this. But at least I know now to just not attempt anything non-trivial via middleware.

#nodeJS #mongoDB

futurefoundry.co/blog/mongoose

futurefoundry.coMongoose Middleware GripesOne of the hardest initial hurdles using Mongoose was understanding the library's middleware or “hook” system which allows you to “hook” into the database transaction lifecycle to perform operations.

Here’s what I want. A package for persisting data that uses a #SwiftUI-style DSL to define models and migrations, has simple concurrency, uses the #ActiveRecord pattern, and steals anything #Rails gets right.

I don’t know if I have the skills to pull that off by myself, or how much Swift would fight you in trying to achieve this, but I think it would be fantastic and a better developer experience than #CoreData.

Please don’t reply to tell me about existing persistence frameworks.