Skip to content
This repository was archived by the owner on Aug 16, 2019. It is now read-only.
This repository was archived by the owner on Aug 16, 2019. It is now read-only.

Broken "params" in guide with Operations/Handling Input #125

@bbugh

Description

@bbugh

In Operations > 01 > Handling Input it says to add def how_are_you?(options, params:, **) to the method and use BlogPost::Create.( { happy: "yes" } ) to call it. However, I get an error when running the example spec:

     Failure/Error:
           def how_are_you?(options, params:, **)
             puts "How are you?"
       
             params[:happy] == "yes"
           end
     
     ArgumentError:
       missing keyword: params

Changing the spec line to this:

result = BlogPost::Create.call(params: { happy: "yes" })

results in a spec test success, but I still don't know if this how it's supposed to work, because Trailblazer::Rails::Controller#run doesn't pass a params key in, it just directly passes the params (presumably to options).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions