Sha256: 9a331b155fbefdf0c52e83133f6c77dd217faadc271bcb0f0904112010b5ce01
Contents?: true
Size: 949 Bytes
Versions: 9
Compression:
Stored size: 949 Bytes
Contents
# == Schema Information # # Table name: wbase_plans # # id :integer not null, primary key # name :string not null # stripe_id :string not null # price :integer not null # interval :string default("monthly") # features :text # highlight :boolean default(FALSE) # display_order :integer default(0) # created_at :datetime not null # updated_at :datetime not null # # Indexes # # index_wbase_plans_on_name (name) # index_wbase_plans_on_stripe_id (stripe_id) # module Wbase class Plan < ActiveRecord::Base has_many :subscriptions def self.monthly where("interval LIKE '%month%'") end def self.annual where("interval LIKE '%yearly%'") end def monthly? interval.include?('month') end def annual? interval.include?('year') end end end
Version data entries
9 entries across 9 versions & 1 rubygems