Created
December 19, 2014 14:33
-
-
Save lgs/44a7abf19eac4d294cea to your computer and use it in GitHub Desktop.
This file contains hidden or 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
irb(main):003:0> SubscriptionPlan.first | |
SubscriptionPlan Load (0.4ms) SELECT "subscription_plans".* FROM "subscription_plans" ORDER BY "subscription_plans"."id" ASC LIMIT 1 | |
=> nil | |
irb(main):004:0> SubscriptionPlan.create(amount: 1000, interval: "month", stripe_id: "test-plan", name: "Test Plan") | |
(0.2ms) begin transaction | |
SubscriptionPlan Exists (0.3ms) SELECT 1 AS one FROM "subscription_plans" WHERE "subscription_plans"."stripe_id" = 'test-plan' LIMIT 1 | |
(0.2ms) rollback transaction | |
Stripe::InvalidRequestError: (Status 400) Plan already exists. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment