class Admin::TrendingIpsController < Admin::AdminController - Admin::TrendingIpsController assumes too much for instance variable '@petition'
- Admin::TrendingIpsController has no descriptive comment
before_action :fetch_petition
before_action :fetch_trending_ips
def index
respond_to do |format|
format.html
end
end
private
def fetch_petition
@petition = Petition.find(params[:petition_id])
end
def fetch_trending_ips
@trending_ips = @petition.trending_ips.search(params[:q], page: params[:page])
end
end