diff --git a/README.rdoc b/README.rdoc
index 3051b7d1..890fcb1c 100644
--- a/README.rdoc
+++ b/README.rdoc
@@ -1,4 +1,4 @@
-= Notebook.ai
+= Notebook.ai
{
}[https://travis-ci.org/indentlabs/notebook]
{
}[https://codeclimate.com/github/indentlabs/notebook]
{
}[https://codeclimate.com/github/indentlabs/notebook/coverage]
diff --git a/app/models/content_types/universe.rb b/app/models/content_types/universe.rb
index 59ab6759..85823017 100644
--- a/app/models/content_types/universe.rb
+++ b/app/models/content_types/universe.rb
@@ -49,7 +49,7 @@ class Universe < ApplicationRecord
has_many :contributors, dependent: :destroy
- scope :in_universe, ->(universe = nil) { where(universe: self) unless universe.nil? }
+ scope :in_universe, ->(universe = nil) { where(id: universe.try(:id)) unless universe.nil? }
after_destroy do
Rails.application.config.content_types[:all_non_universe].each do |content_type|
diff --git a/spec/controllers/subscriptions_controller_spec.rb b/spec/controllers/subscriptions_controller_spec.rb
index cbc7f59f..35780d1c 100644
--- a/spec/controllers/subscriptions_controller_spec.rb
+++ b/spec/controllers/subscriptions_controller_spec.rb
@@ -144,7 +144,7 @@ RSpec.describe SubscriptionsController, type: :controller do
)
expect(@user.selected_billing_plan_id).to eq(@free_plan.id)
- expect(@user.active_billing_plans).to eq([@free_plan])
+ expect(@user.active_billing_plans).not_to eq([@premium_plan])
post :change, params: { stripe_plan_id: 'premium' }
@@ -155,7 +155,7 @@ RSpec.describe SubscriptionsController, type: :controller do
describe "Starter Permissions" do
before do
- @user.update(selected_billing_plan_id: @premium_plan.id)
+ @user.update(selected_billing_plan_id: @free_plan.id)
end
it "allows Starter users to create core content types" do