#activemodel — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #activemodel, aggregated by home.social.
-
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`.
-
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`.
-
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`.
-
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`.
-
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`.