Sha256: eff35fbf2866f849ac73d6210e5826f5af32287be657b51543178e242b6532f6
Contents?: true
Size: 493 Bytes
Versions: 8
Compression:
Stored size: 493 Bytes
Contents
class Admin::StatsController < ApplicationController before_filter :authenticate_admin_user! def stats if params[:scope].blank? render :json => { :errors => "scope not set" }, :status => 422 else cls = User cls = Identity.where( "provider = ?", "twitter" ) if params[:scope] == 'twitter_users' cls = Identity.where( "provider = ?", "instagram" ) if params[:scope] == 'instagram_users' ret = cls.group_by_month render json: ret end end end
Version data entries
8 entries across 8 versions & 1 rubygems