Skip to content

Commit

Permalink
Revert dummy changes in Rails files
Browse files Browse the repository at this point in the history
  • Loading branch information
Splines committed Nov 14, 2023
1 parent b44c28d commit fe34579
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions app/models/notion.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# is it working?
class Notion < ApplicationRecord

Check failure on line 1 in app/models/notion.rb

View workflow job for this annotation

GitHub Actions / RuboCop

Style/Documentation: Missing top-level documentation comment for `class Notion`.

Check failure on line 1 in app/models/notion.rb

View workflow job for this annotation

GitHub Actions / RuboCop

Style/FrozenStringLiteralComment: Missing frozen string literal comment.
belongs_to :tag, optional: true, touch: true
belongs_to :aliased_tag, class_name: 'Tag', optional: true, touch: true
Expand All @@ -7,8 +6,8 @@ class Notion < ApplicationRecord
validates :title, presence: true
validate :presence_of_tag, if: :persisted?

after_save :touch_tag_relations
before_destroy :touch_tag_relations
after_save :touch_tag_relations

def presence_of_tag
return if tag || aliased_tag
Expand Down
5 changes: 2 additions & 3 deletions spec/rails_helper.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# frozen_string_literal: true

# This file is copied to spec/ when you run 'rails generate rspec:install'
# Test
require 'spec_helper'
require File.expand_path('../../config/environment', __FILE__)
require File.expand_path('../config/environment', __dir__)
# Prevent database truncation if the environment is production
abort('The Rails env is running in production mode!') if Rails.env.production?
require 'rspec/rails'
Expand All @@ -29,7 +28,7 @@
# If you are not using ActiveRecord, you can remove this line.
ActiveRecord::Migration.maintain_test_schema!

Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }

RSpec.configure do |config|
# Include Factory Girl syntax to simplify calls to factories
Expand Down

0 comments on commit fe34579

Please sign in to comment.