Skip to content

Commit

Permalink
Fix lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
tzhao-ooc committed Sep 25, 2024
1 parent f3ef64e commit e833031
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 12 deletions.
5 changes: 2 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ gem "bootsnap", require: false


# Encrpyt password
gem 'bcrypt', '~> 3.1.7'
gem "bcrypt", "~> 3.1.7"

# Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images]
# gem "image_processing", "~> 1.2"
Expand All @@ -38,5 +38,4 @@ end
group :test do
gem "capybara"
gem "selenium-webdriver"
end

end

Check failure on line 41 in Gemfile

View workflow job for this annotation

GitHub Actions / lint

Layout/TrailingEmptyLines: Final newline missing.
2 changes: 1 addition & 1 deletion app/models/club.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class Club < ApplicationRecord
belongs_to :category
belongs_to :leader, class_name: 'User'
belongs_to :leader, class_name: "User"

validates :club_name, :leader, presence: true
end
3 changes: 1 addition & 2 deletions app/models/event.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class Event < ApplicationRecord
belongs_to :host, class_name: 'User'
belongs_to :host, class_name: "User"
belongs_to :club
belongs_to :event_type
belongs_to :category
Expand All @@ -14,5 +14,4 @@ def event_datetime_must_be_in_future
errors.add(:event_datetime, "must be in the future")
end
end

end
2 changes: 0 additions & 2 deletions db/migrate/20240925022041_create_users.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@ def change
t.string :last_name, null: false
t.string :email, null: false
t.string :password, null: false

t.timestamps
end

add_index :users, :email, unique: true # Add unique index for email
end
end
3 changes: 1 addition & 2 deletions db/migrate/20240925022105_create_categories.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
class CreateCategories < ActiveRecord::Migration[7.2]
def change
create_table :categories do |t|
t.string :name, null:false
t.string :name, null: false
t.text :description

t.timestamps
end
end
Expand Down
3 changes: 1 addition & 2 deletions db/migrate/20240925023427_create_event_types.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
class CreateEventTypes < ActiveRecord::Migration[7.2]
def change
create_table :event_types do |t|
t.text :type, null:false

t.text :type, null: false
t.timestamps
end
end
Expand Down

0 comments on commit e833031

Please sign in to comment.