module SetupRequestParams
  extend ActiveSupport::Concern

  included do
    before_action :request_params
    before_action :set_hireable, if: :empty_params?
  end

  # Setup request param
  def request_params
    Github::Params.new(member_params).set
  end

  private

  def empty_params?
    member_params.empty?
  end

  def set_hireable
    params.merge!(hireable: true)
  end

  # Whitelist the params for our controller
  def member_params
    params.permit(:q, :page)
  end
end

module SetupRequestParams
  extend ActiveSupport::Concern

  included do
    before_action :request_params
  end

  # Setup request param
  def request_params
    Github::Params.new(member_params).set
  end

  private

  # Whitelist the params for our controller
  def member_params
    params.permit(:q, :page)
  end
end

Revert "Setup default hireable option for homepage"
Revert "Setup default hireable option for homepage"

This reverts commit aece357df0a17c485608728f2fe790493418bb13.
