Skip to content

Commit

Permalink
Make file
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardogpg committed Nov 17, 2024
1 parent 1645215 commit 072acef
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
run:
@echo "🚀 Running the application..."
bundle exec rails db:seed
bundle exec rails server

migrate:
@echo "🚀 Running the migrations..."
bundle exec rake db:migrate
annotate --models
annotate --models

shell:
@echo "🚀 Running the console..."
bundle exec rails console
4 changes: 4 additions & 0 deletions app/models/account.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,8 @@
#
class Account < ApplicationRecord
belongs_to :user

def to_s
"#{account_number} - #{user}"
end
end
4 changes: 4 additions & 0 deletions app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,8 @@
# updated_at :datetime not null
#
class User < ApplicationRecord

Check failure on line 14 in app/models/user.rb

View workflow job for this annotation

GitHub Actions / lint

Layout/EmptyLinesAroundClassBody: Extra empty line detected at class body beginning.
def to_s
"#{first_name} #{last_name}"
end
end
15 changes: 15 additions & 0 deletions db/seeds.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,18 @@
# ["Action", "Comedy", "Drama", "Horror"].each do |genre_name|
# MovieGenre.find_or_create_by!(name: genre_name)
# end

# Create the default Account
user = User.find_or_create_by!(
first_name: 'Admin',
last_name: 'Admin',
pin_digest: '1234',
)

Account.find_or_create_by!(
user_id: user.id,

Check failure on line 19 in db/seeds.rb

View workflow job for this annotation

GitHub Actions / lint

Layout/TrailingWhitespace: Trailing whitespace detected.
account_number: '1234567890',

Check failure on line 20 in db/seeds.rb

View workflow job for this annotation

GitHub Actions / lint

Layout/TrailingWhitespace: Trailing whitespace detected.
account_type: 1,

Check failure on line 21 in db/seeds.rb

View workflow job for this annotation

GitHub Actions / lint

Layout/TrailingWhitespace: Trailing whitespace detected.
balance: 1000,

Check failure on line 22 in db/seeds.rb

View workflow job for this annotation

GitHub Actions / lint

Layout/TrailingWhitespace: Trailing whitespace detected.
CLABE: '123456789012345678'
)

Check failure on line 24 in db/seeds.rb

View workflow job for this annotation

GitHub Actions / lint

Layout/TrailingEmptyLines: Final newline missing.

0 comments on commit 072acef

Please sign in to comment.