mastodon.zunda.ninja is one of the many independent Mastodon servers you can use to participate in the fediverse.
Zundon is a single user instance as home of @zundan as well as a test bed for changes of the code.

Administered by:

Server stats:

1
active users

$ git grep StatusPinValidator
app/models/status_pin.rb: validates_with StatusPinValidator
app/validators/status_pin_validator.rb:class StatusPinValidator < ActiveModel::Validator
spec/validators/status_pin_validator_spec.rb:RSpec.describe StatusPinValidator, type: :validator do

なのでたぶんこのコードがサーバで走るのはapp/models/status_pin.rbだけでこのファイルは

class StatusPin < ApplicationRecord
belongs_to :account
belongs_to :status

validates_with StatusPinValidator
end

という内容なので…validates_withはいつ走るんじゃ←

https://api.rubyonrails.org/v5.2.3/classes/ActiveModel/Validations/ClassMethods.html#metho

> Passes the record off to the class or classes specified and allows them to add errors based on more complex conditions.

うむわからんw

api.rubyonrails.orgActiveModel::Validations::ClassMethods

> Options:
>
> :on - Specifies the contexts where this validation is active. Runs in all validation contexts by default nil.

指定しない場合はすべてのコンテキストでバリデーションが走ります。すべてって誰よ!

zunda

$ git grep -o StatusPin\\.\\w\*
controllers/api/v1/statuses/pins_controller.rb:StatusPin.create
controllers/api/v1/statuses/pins_controller.rb:StatusPin.find_by
lib/activitypub/activity/add.rb:StatusPin.create
lib/activitypub/activity/remove.rb:StatusPin.find_by
models/status.rb:StatusPin.select
services/activitypub/fetch_featured_collection_service.rb:StatusPin.where
services/activitypub/fetch_featured_collection_service.rb:StatusPin.where
services/activitypub/fetch_featured_collection_service.rb:StatusPin.create

ういうい