Created
August 22, 2011 22:35
-
-
Save NeMO84/1163828 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ruby-1.9.2-p0 > sub_end.strftime("Ends on %m/%d/%Y at %I:%M%p") | |
NoMethodError: undefined method `strftime' for 1315186557:Fixnum | |
from (irb):12 | |
from /.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.9/lib/rails/commands/console.rb:44:in `start' | |
from /.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.9/lib/rails/commands/console.rb:8:in `start' | |
from /.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.9/lib/rails/commands.rb:23:in `<top (required)>' | |
from script/rails:6:in `require' | |
from script/rails:6:in `<main>' | |
ruby-1.9.2-p0 > sub_end | |
=> 1315186557 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ruby-1.9.2-p0 > sub_end = test.subscriptions.last.period_end | |
=> 1315186557 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# == Schema Information | |
# | |
# Table name: subscriptions | |
# | |
# id :integer not null, primary key | |
# status :string(255) | |
# plan_id :integer | |
# payment_method_token :string(255) | |
# created_at :datetime | |
# updated_at :datetime | |
# user_id :integer | |
# period_start :datetime | |
# period_end :datetime | |
# coupon_id :integer | |
class Subscription < ActiveRecord::Base | |
belongs_to :plan | |
has_one :coupon | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment