Skip to content

Commit

Permalink
Added Users model and a create user page.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmckissock committed Jun 10, 2024
1 parent c1044b0 commit 7802af6
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ gem "tzinfo-data", platforms: %i[mswin mswin64 mingw x64_mingw jruby]
# Reduces boot times through caching; required in config/boot.rb
gem "bootsnap", require: false

#Authentication
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 Down
2 changes: 2 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ GEM
public_suffix (>= 2.0.2, < 6.0)
ast (2.4.2)
base64 (0.2.0)
bcrypt (3.1.20)
bigdecimal (3.1.8)
bindex (0.8.1)
bootsnap (1.18.3)
Expand Down Expand Up @@ -307,6 +308,7 @@ PLATFORMS
x86_64-linux

DEPENDENCIES
bcrypt (~> 3.1.7)
bootsnap
capybara
debug
Expand Down
1 change: 1 addition & 0 deletions app/views/articles/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<h1>Articles</h1>
<%= link_to 'Add an article', new_article_path, class: 'btn btn-primary' %>
<%= link_to 'Create User', new_user_path, class: 'btn btn-secondary' %>

<ul>
<% @articles.each do |article| %>
Expand Down
1 change: 1 addition & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Rails.application.routes.draw do
root "articles#index"
resources :articles
resources :users, only: [:new, :create]

# For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html
end
10 changes: 9 additions & 1 deletion db/schema.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7802af6

Please sign in to comment.