home.social

#activemodel — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #activemodel, aggregated by home.social.

  1. Made a gem out of an earlier proof-of-concept: github.com/henrik/activemodel-

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

    #RubyOnRails #ActiveRecord #ActiveModel

  2. Made a gem out of an earlier proof-of-concept: github.com/henrik/activemodel-

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

    #RubyOnRails #ActiveRecord #ActiveModel

  3. Made a gem out of an earlier proof-of-concept: github.com/henrik/activemodel-

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

    #RubyOnRails #ActiveRecord #ActiveModel

  4. Made a gem out of an earlier proof-of-concept: github.com/henrik/activemodel-

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

    #RubyOnRails #ActiveRecord #ActiveModel

  5. Made a gem out of an earlier proof-of-concept: github.com/henrik/activemodel-

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

    #RubyOnRails #ActiveRecord #ActiveModel