Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class StatisticVariable < ActiveRecord::Base
- attr_accessible :code, :name
- has_many :statistic_values
- scope :logins, where(code: 'logins').first
- scope :unique_logins, where(code: 'unique_logins').first
- scope :registrations, where(code: 'registrations').first
- end
- def self.registrations
- where(code: 'registrations').first
- end
- scope :logins, where(code: 'logins')
- scope :unique_logins, where(code: 'unique_logins')
- scope :registrations, where(code: 'registrations')
- def self.login
- logins.first
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement