You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My code looks like this, I need to render other keys unless params[:search].present? @response.merge!({code: 0, message:"failed, please provide search term"}) else data = Model.search(params[:search]) @response[:data] = { search_result: data, size: data.count } @response.merge!({code: 1, message:"success"}) end
`render status: :ok, json: @response`
But as pager api it internally renders the given records.