Skip to content

Params not recognized by grape "declared" method #127

Open
@pcriv

Description

@pcriv

When using entity documentation as params they don't show whe calling then 'declared' method.

namespace :cdrs do
  desc 'Shows all Outbound CDRs.', params: Entities::CdrSearch.documentation
  params do
    optional :fields, type: String
  end

  get :out do
    authorize!
    query_by(Entities::OutboundCdr, permitted_params)
  end
end

permitted_params
=> {"fields"=>"asda"}

def permitted_params
  @permitted_params ||= declared(params, include_missing: false, include_parent_namespaces: true)
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions