andypike / rectify

Build maintainable Rails apps
MIT License
596 stars 48 forks source link

Allow kwargs #63

Open Vagab opened 1 year ago

Vagab commented 1 year ago

Use case

Tried this today:

class SomeController < ApplicationController
  def some_action
    SomeCommand.call do
      on(:something) do
        some_method_with_kwargs(yeet:)
      end
    end
  end

  private

  def some_method_with_kwargs(yeet:); end
end

Which doesn't work. This uber small pr solves that. Also doesn't seem to break anything

@andypike let me know if I should add tests for this or smth