The code powering m.abunchtell.com https://m.abunchtell.com
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

26 行
521 B

  1. # frozen_string_literal: true
  2. module Admin
  3. class RelationshipsController < BaseController
  4. before_action :set_account
  5. PER_PAGE = 40
  6. def index
  7. authorize :account, :index?
  8. @accounts = RelationshipFilter.new(@account, filter_params).results.page(params[:page]).per(PER_PAGE)
  9. end
  10. private
  11. def set_account
  12. @account = Account.find(params[:account_id])
  13. end
  14. def filter_params
  15. params.slice(RelationshipFilter::KEYS).permit(RelationshipFilter::KEYS)
  16. end
  17. end
  18. end