diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index bd44d15a92..150f9c4b75 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -13,10 +13,10 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-ruby@v1 with: - ruby-version: 2.6.x + ruby-version: 3.0.x - name: Setup Rubocop run: | - gem install --no-document rubocop:'~>0.81.0' # https://docs.rubocop.org/en/stable/installation/ + gem install --no-document rubocop -v '>= 1.0, < 2.0' # https://docs.rubocop.org/en/stable/installation/ [ -f .rubocop.yml ] || wget https://raw.githubusercontent.com/microverseinc/linters-config/master/ror/.rubocop.yml - name: Rubocop Report run: rubocop --color @@ -30,7 +30,7 @@ jobs: node-version: "12.x" - name: Setup Stylelint run: | - npm install --save-dev stylelint@13.3.x stylelint-scss@3.17.x stylelint-config-standard@20.0.x stylelint-csstree-validator + npm install --save-dev stylelint@13.x stylelint-scss@3.x stylelint-config-standard@21.x stylelint-csstree-validator@1.x [ -f .stylelintrc.json ] || wget https://raw.githubusercontent.com/microverseinc/linters-config/master/ror/.stylelintrc.json - name: Stylelint Report run: npx stylelint "**/*.{css,scss}" \ No newline at end of file diff --git a/.gitignore b/.gitignore index 18b43c9cd2..b916d63abe 100644 --- a/.gitignore +++ b/.gitignore @@ -19,9 +19,11 @@ /node_modules /yarn-error.log +/Gemfile.lock /public/assets .byebug_history # Ignore master key for decrypting credentials and more. /config/master.key + diff --git a/.rubocop.yml b/.rubocop.yml index 89f3b6bdbd..d8187c3d53 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,7 +1,8 @@ AllCops: + NewCops: enable Exclude: - "db/**/*" - - "bin/*" + - "bin/*" - "config/**/*" - "Guardfile" - "Rakefile" @@ -24,7 +25,7 @@ Metrics/AbcSize: Metrics/ClassLength: Max: 150 Metrics/BlockLength: - ExcludedMethods: ["describe"] + IgnoredMethods: ['describe'] Max: 30 Style/Documentation: diff --git a/.ruby-version b/.ruby-version index 9aa34646dc..13d683ccbf 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.7.0 \ No newline at end of file +3.0.1 \ No newline at end of file diff --git a/.stylelintrc.json b/.stylelintrc.json index c592372ef2..b7b365775d 100644 --- a/.stylelintrc.json +++ b/.stylelintrc.json @@ -1,16 +1,10 @@ - { "extends": ["stylelint-config-standard"], "plugins": ["stylelint-scss", "stylelint-csstree-validator"], "rules": { "at-rule-no-unknown": null, "scss/at-rule-no-unknown": true, - "csstree/validator": - { - "properties": { - "width": "| fit-content" - } - } + "csstree/validator": true }, "ignoreFiles": ["build/**", "dist/**", "**/reset*.css", "**/bootstrap*.css"] } diff --git a/Gemfile b/Gemfile index 67b156b339..e4a9fccccd 100644 --- a/Gemfile +++ b/Gemfile @@ -1,16 +1,25 @@ source 'https://rubygems.org' git_source(:github) { |repo| "https://github.com/#{repo}.git" } -ruby '2.7.0' +# ruby '2.7.0' +ruby '3.0.1' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' -gem 'rails', '~> 5.2.4' +gem 'rails', '~> 6.1.3', '>= 6.1.3.2' # Use postgresql as the database for Active Record -gem 'pg', '>= 0.18', '< 2.0' +group :development, :test do + gem 'sqlite3' +end + +group :production do + gem 'pg' +end + # Use Puma as the app server -gem 'puma', '~> 3.12' +gem 'puma', '~> 5.0' # Use SCSS for stylesheets -gem 'sass-rails', '~> 5.0' +gem 'bootstrap', '~> 4.0' +gem 'sass-rails', '>= 6' # Use Uglifier as compressor for JavaScript assets gem 'uglifier', '>= 1.3.0' # See https://github.com/rails/execjs#readme for more supported runtimes @@ -21,7 +30,7 @@ gem 'coffee-rails', '~> 4.2' # Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks gem 'turbolinks', '~> 5' # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder -gem 'jbuilder', '~> 2.5' +gem 'jbuilder', '~> 2.7' # Use Redis adapter to run Action Cable in production # gem 'redis', '~> 4.0' # Use ActiveModel has_secure_password @@ -48,6 +57,17 @@ group :test do gem 'rspec' end +group :development, :test do + # The RSpec testing framework + gem 'rspec-rails' + # Capybara, the library that allows us to interact with the browser using Ruby + gem 'capybara' + # The following gems aids with the nuts and bolts + # of interacting with the browser. + gem 'webdrivers' +end + + group :development do # Access an interactive console on exception pages or by calling 'console' anywhere in the code. gem 'listen', '>= 3.0.5', '< 3.2' diff --git a/Gemfile.lock b/Gemfile.lock index b67d4b3306..3f2999e5ac 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,55 +1,89 @@ GEM remote: https://rubygems.org/ specs: - actioncable (5.2.4.1) - actionpack (= 5.2.4.1) + actioncable (6.1.3.2) + actionpack (= 6.1.3.2) + activesupport (= 6.1.3.2) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailer (5.2.4.1) - actionpack (= 5.2.4.1) - actionview (= 5.2.4.1) - activejob (= 5.2.4.1) + actionmailbox (6.1.3.2) + actionpack (= 6.1.3.2) + activejob (= 6.1.3.2) + activerecord (= 6.1.3.2) + activestorage (= 6.1.3.2) + activesupport (= 6.1.3.2) + mail (>= 2.7.1) + actionmailer (6.1.3.2) + actionpack (= 6.1.3.2) + actionview (= 6.1.3.2) + activejob (= 6.1.3.2) + activesupport (= 6.1.3.2) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (5.2.4.1) - actionview (= 5.2.4.1) - activesupport (= 5.2.4.1) - rack (~> 2.0, >= 2.0.8) + actionpack (6.1.3.2) + actionview (= 6.1.3.2) + activesupport (= 6.1.3.2) + rack (~> 2.0, >= 2.0.9) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (5.2.4.1) - activesupport (= 5.2.4.1) + rails-html-sanitizer (~> 1.0, >= 1.2.0) + actiontext (6.1.3.2) + actionpack (= 6.1.3.2) + activerecord (= 6.1.3.2) + activestorage (= 6.1.3.2) + activesupport (= 6.1.3.2) + nokogiri (>= 1.8.5) + actionview (6.1.3.2) + activesupport (= 6.1.3.2) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.0.3) - activejob (5.2.4.1) - activesupport (= 5.2.4.1) + rails-html-sanitizer (~> 1.1, >= 1.2.0) + activejob (6.1.3.2) + activesupport (= 6.1.3.2) globalid (>= 0.3.6) - activemodel (5.2.4.1) - activesupport (= 5.2.4.1) - activerecord (5.2.4.1) - activemodel (= 5.2.4.1) - activesupport (= 5.2.4.1) - arel (>= 9.0) - activestorage (5.2.4.1) - actionpack (= 5.2.4.1) - activerecord (= 5.2.4.1) - marcel (~> 0.3.1) - activesupport (5.2.4.1) + activemodel (6.1.3.2) + activesupport (= 6.1.3.2) + activerecord (6.1.3.2) + activemodel (= 6.1.3.2) + activesupport (= 6.1.3.2) + activestorage (6.1.3.2) + actionpack (= 6.1.3.2) + activejob (= 6.1.3.2) + activerecord (= 6.1.3.2) + activesupport (= 6.1.3.2) + marcel (~> 1.0.0) + mini_mime (~> 1.0.2) + activesupport (6.1.3.2) concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (>= 0.7, < 2) - minitest (~> 5.1) - tzinfo (~> 1.1) - arel (9.0.0) - ast (2.4.0) - bcrypt (3.1.13) + i18n (>= 1.6, < 2) + minitest (>= 5.1) + tzinfo (~> 2.0) + zeitwerk (~> 2.3) + addressable (2.7.0) + public_suffix (>= 2.0.2, < 5.0) + ast (2.4.2) + autoprefixer-rails (10.2.5.1) + execjs (> 0) + bcrypt (3.1.16) bindex (0.8.1) - bootsnap (1.4.6) + bootsnap (1.7.5) msgpack (~> 1.0) + bootstrap (4.6.0) + autoprefixer-rails (>= 9.1.0) + popper_js (>= 1.14.3, < 2) + sassc-rails (>= 2.0.0) builder (3.2.4) - byebug (11.1.1) + byebug (11.1.3) + capybara (3.35.3) + addressable + mini_mime (>= 0.1.3) + nokogiri (~> 1.8) + rack (>= 1.6.0) + rack-test (>= 0.6.3) + regexp_parser (>= 1.5, < 3.0) + xpath (~> 3.2) + childprocess (3.0.0) coffee-rails (4.2.2) coffee-script (>= 2.2.0) railties (>= 4.0.0) @@ -57,189 +91,206 @@ GEM coffee-script-source execjs coffee-script-source (1.12.2) - concurrent-ruby (1.1.6) + concurrent-ruby (1.1.9) crass (1.0.6) - devise (4.7.1) + devise (4.8.0) bcrypt (~> 3.0) orm_adapter (~> 0.1) railties (>= 4.1.0) responders warden (~> 1.2.3) - diff-lcs (1.3) - erubi (1.9.0) - execjs (2.7.0) - ffi (1.12.2) - ffi (1.12.2-x64-mingw32) + diff-lcs (1.4.4) + erubi (1.10.0) + execjs (2.8.1) + ffi (1.15.3) globalid (0.4.2) activesupport (>= 4.2.0) - i18n (1.8.2) + i18n (1.8.10) concurrent-ruby (~> 1.0) - jaro_winkler (1.5.4) - jbuilder (2.10.0) + jbuilder (2.11.2) activesupport (>= 5.0.0) - listen (3.1.5) + listen (3.0.8) rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) - ruby_dep (~> 1.2) - loofah (2.4.0) + loofah (2.10.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) mail (2.7.1) mini_mime (>= 0.1.1) - marcel (0.3.3) - mimemagic (~> 0.3.2) - method_source (0.9.2) - mimemagic (0.3.4) - mini_mime (1.0.2) - mini_portile2 (2.5.0) - minitest (5.14.0) - msgpack (1.3.3) - msgpack (1.3.3-x64-mingw32) - nio4r (2.5.2) - nokogiri (1.11.1) - mini_portile2 (~> 2.5.0) - racc (~> 1.4) - nokogiri (1.11.1-x64-mingw32) + marcel (1.0.1) + method_source (1.0.0) + mini_mime (1.0.3) + minitest (5.14.4) + msgpack (1.4.2) + nio4r (2.5.7) + nokogiri (1.11.7-x86_64-darwin) racc (~> 1.4) orm_adapter (0.5.0) - parallel (1.19.1) - parser (2.7.0.4) - ast (~> 2.4.0) - pg (1.2.2) - pg (1.2.2-x64-mingw32) - puma (3.12.6) + parallel (1.20.1) + parser (3.0.1.1) + ast (~> 2.4.1) + pg (1.2.3) + popper_js (1.16.0) + public_suffix (4.0.6) + puma (5.3.2) + nio4r (~> 2.0) racc (1.5.2) rack (2.2.3) rack-test (1.1.0) rack (>= 1.0, < 3) - rails (5.2.4.1) - actioncable (= 5.2.4.1) - actionmailer (= 5.2.4.1) - actionpack (= 5.2.4.1) - actionview (= 5.2.4.1) - activejob (= 5.2.4.1) - activemodel (= 5.2.4.1) - activerecord (= 5.2.4.1) - activestorage (= 5.2.4.1) - activesupport (= 5.2.4.1) - bundler (>= 1.3.0) - railties (= 5.2.4.1) + rails (6.1.3.2) + actioncable (= 6.1.3.2) + actionmailbox (= 6.1.3.2) + actionmailer (= 6.1.3.2) + actionpack (= 6.1.3.2) + actiontext (= 6.1.3.2) + actionview (= 6.1.3.2) + activejob (= 6.1.3.2) + activemodel (= 6.1.3.2) + activerecord (= 6.1.3.2) + activestorage (= 6.1.3.2) + activesupport (= 6.1.3.2) + bundler (>= 1.15.0) + railties (= 6.1.3.2) sprockets-rails (>= 2.0.0) rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) rails-html-sanitizer (1.3.0) loofah (~> 2.3) - railties (5.2.4.1) - actionpack (= 5.2.4.1) - activesupport (= 5.2.4.1) + railties (6.1.3.2) + actionpack (= 6.1.3.2) + activesupport (= 6.1.3.2) method_source rake (>= 0.8.7) - thor (>= 0.19.0, < 2.0) + thor (~> 1.0) rainbow (3.0.0) - rake (13.0.1) - rb-fsevent (0.10.3) + rake (13.0.3) + rb-fsevent (0.11.0) rb-inotify (0.10.1) ffi (~> 1.0) - responders (3.0.0) + regexp_parser (2.1.1) + responders (3.0.1) actionpack (>= 5.0) railties (>= 5.0) - rexml (3.2.4) - rspec (3.9.0) - rspec-core (~> 3.9.0) - rspec-expectations (~> 3.9.0) - rspec-mocks (~> 3.9.0) - rspec-core (3.9.1) - rspec-support (~> 3.9.1) - rspec-expectations (3.9.1) + rexml (3.2.5) + rspec (3.10.0) + rspec-core (~> 3.10.0) + rspec-expectations (~> 3.10.0) + rspec-mocks (~> 3.10.0) + rspec-core (3.10.1) + rspec-support (~> 3.10.0) + rspec-expectations (3.10.1) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.9.0) - rspec-mocks (3.9.1) + rspec-support (~> 3.10.0) + rspec-mocks (3.10.2) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.9.0) - rspec-support (3.9.2) - rubocop (0.80.1) - jaro_winkler (~> 1.5.1) + rspec-support (~> 3.10.0) + rspec-rails (5.0.1) + actionpack (>= 5.2) + activesupport (>= 5.2) + railties (>= 5.2) + rspec-core (~> 3.10) + rspec-expectations (~> 3.10) + rspec-mocks (~> 3.10) + rspec-support (~> 3.10) + rspec-support (3.10.2) + rubocop (1.17.0) parallel (~> 1.10) - parser (>= 2.7.0.1) + parser (>= 3.0.0.0) rainbow (>= 2.2.2, < 4.0) + regexp_parser (>= 1.8, < 3.0) rexml + rubocop-ast (>= 1.7.0, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 1.4.0, < 1.7) - ruby-progressbar (1.10.1) - ruby_dep (1.5.0) - sass (3.7.4) - sass-listen (~> 4.0.0) - sass-listen (4.0.0) - rb-fsevent (~> 0.9, >= 0.9.4) - rb-inotify (~> 0.9, >= 0.9.7) - sass-rails (5.1.0) - railties (>= 5.2.0) - sass (~> 3.1) - sprockets (>= 2.8, < 4.0) - sprockets-rails (>= 2.0, < 4.0) - tilt (>= 1.1, < 3) - spring (2.1.0) + unicode-display_width (>= 1.4.0, < 3.0) + rubocop-ast (1.7.0) + parser (>= 3.0.1.1) + ruby-progressbar (1.11.0) + rubyzip (2.3.0) + sass-rails (6.0.0) + sassc-rails (~> 2.1, >= 2.1.1) + sassc (2.4.0) + ffi (~> 1.9) + sassc-rails (2.1.2) + railties (>= 4.0.0) + sassc (>= 2.0) + sprockets (> 3.0) + sprockets-rails + tilt + selenium-webdriver (3.142.7) + childprocess (>= 0.5, < 4.0) + rubyzip (>= 1.2.2) + spring (2.1.1) spring-watcher-listen (2.0.1) listen (>= 2.7, < 4.0) spring (>= 1.2, < 3.0) - sprockets (3.7.2) + sprockets (4.0.2) concurrent-ruby (~> 1.0) rack (> 1, < 3) - sprockets-rails (3.2.1) + sprockets-rails (3.2.2) actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) - thor (1.0.1) - thread_safe (0.3.6) + sqlite3 (1.4.2) + thor (1.1.0) tilt (2.0.10) turbolinks (5.2.1) turbolinks-source (~> 5.2) turbolinks-source (5.2.0) - tzinfo (1.2.6) - thread_safe (~> 0.1) - tzinfo-data (1.2020.1) - tzinfo (>= 1.0.0) + tzinfo (2.0.4) + concurrent-ruby (~> 1.0) uglifier (4.2.0) execjs (>= 0.3.0, < 3) - unicode-display_width (1.6.1) - warden (1.2.8) - rack (>= 2.0.6) - web-console (3.7.0) - actionview (>= 5.0) - activemodel (>= 5.0) + unicode-display_width (2.0.0) + warden (1.2.9) + rack (>= 2.0.9) + web-console (4.1.0) + actionview (>= 6.0.0) + activemodel (>= 6.0.0) bindex (>= 0.4.0) - railties (>= 5.0) - websocket-driver (0.7.1) + railties (>= 6.0.0) + webdrivers (4.6.0) + nokogiri (~> 1.6) + rubyzip (>= 1.3.0) + selenium-webdriver (>= 3.0, < 4.0) + websocket-driver (0.7.5) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) + xpath (3.2.0) + nokogiri (~> 1.8) + zeitwerk (2.4.2) PLATFORMS - ruby - x64-mingw32 + x86_64-darwin-19 DEPENDENCIES bootsnap (>= 1.1.0) + bootstrap (~> 4.0) byebug + capybara coffee-rails (~> 4.2) devise - jbuilder (~> 2.5) + jbuilder (~> 2.7) listen (>= 3.0.5, < 3.2) - pg (>= 0.18, < 2.0) - puma (~> 3.12) - rails (~> 5.2.4) + pg + puma (~> 5.0) + rails (~> 6.1.3, >= 6.1.3.2) rspec + rspec-rails rubocop - sass-rails (~> 5.0) + sass-rails (>= 6) spring spring-watcher-listen (~> 2.0.0) + sqlite3 turbolinks (~> 5) tzinfo-data uglifier (>= 1.3.0) web-console (>= 3.3.0) + webdrivers RUBY VERSION - ruby 2.7.0p0 + ruby 3.0.1p64 BUNDLED WITH - 2.1.2 + 2.2.21 diff --git a/app/assets/stylesheets/friendship.scss b/app/assets/stylesheets/friendship.scss new file mode 100644 index 0000000000..0bc6dcf556 --- /dev/null +++ b/app/assets/stylesheets/friendship.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the Friendship controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: https://sass-lang.com/ diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index b0350d70e4..d2573592b7 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -9,4 +9,27 @@ def show @user = User.find(params[:id]) @posts = @user.posts.ordered_by_most_recent end + + def request_friend + request = current_user.friendships.build(friend_id: params['id'], confirmed: false) + request.save + flash[:notice] = 'Friend Request Successfully sent' + redirect_to users_path + end + + def accept_freind + current_user.accept_friendship(params[:id]) + user = User.find(params[:id]) + + flash[:notice] = "You Accepted #{user.name}'s Friend Request!" + redirect_to users_path + end + + def decline_friend + current_user.decline_friendship(params[:id]) + user = User.find(params[:id]) + + flash[:notice] = "You Declined #{user.name}'s Friends Request" + redirect_to users_path + end end diff --git a/app/models/friendship.rb b/app/models/friendship.rb new file mode 100644 index 0000000000..cbc99ab545 --- /dev/null +++ b/app/models/friendship.rb @@ -0,0 +1,7 @@ +class Friendship < ApplicationRecord + scope :pending_requests, -> { where(status: false) } + scope :accepted_requests, -> { where(status: true) } + + belongs_to :user + belongs_to :friend, class_name: 'User' +end diff --git a/app/models/user.rb b/app/models/user.rb index e97f1363c0..4933e8dff0 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -9,4 +9,38 @@ class User < ApplicationRecord has_many :posts has_many :comments, dependent: :destroy has_many :likes, dependent: :destroy + has_many :friendships + has_many :inverse_friendships, class_name: 'Friendship', foreign_key: 'friend_id' + + # Helper methods + def friends + friends_array = friendships.map { |friendship| friendship.friend if friendship.confirmed } + friends_array += inverse_friendships.map { |friendship| friendship.user if friendship.confirmed } + friends_array.compact + end + + # Users who have yet to confirmed friend requests + def pending_friends + friendships.map { |friendship| friendship.friend unless friendship.confirmed }.compact + end + + # Users who have requested to be friends + def friend_requests + inverse_friendships.map { |friendship| friendship.user unless friendship.confirmed }.compact + end + + def confirm_friend(user) + friendship = inverse_friendships.find { |friend| friend.user == user } + friendship.confirmed = true + friendship.save + end + + def friend?(user) + friends.include?(user) + end + + def decline_friendship(user_id) + request = inverse_friendships.where(user_id: user_id).where(confirmed: false).first + request.destroy + end end diff --git a/app/views/posts/_post.html.erb b/app/views/posts/_post.html.erb index 271625b734..dc4778b30c 100644 --- a/app/views/posts/_post.html.erb +++ b/app/views/posts/_post.html.erb @@ -1,23 +1,26 @@
  • -
    - <%= link_to post.user.name, user_path(post.user), class: 'post-author' %> -
    -
    - - <%= like_or_dislike_btn(post) %> -
    -
    -

    - <%= post.content %> -

    + <% if current_user == post.user || current_user.friends.include?(post.user)%> +
    + <%= link_to post.user.name, user_path(post.user), class: 'post-author' %> +
    +
    + + <%= like_or_dislike_btn(post) %> +
    + +

    + <%= post.content %> +

    -
    - <%= render partial: 'comments/comment', collection: post.comments %> +
    + <%= render partial: 'comments/comment', collection: post.comments %> - <%= form_for(post.comments.new, url: post_comments_path(post)) do |form| %> - <%= form.text_field :content, id: :comment_content, class: 'form-control', placeholder: 'Add new Comment' %> - <%= form.submit 'Comment', class: 'btn btn-secondary' %> - <% end %> + <%= form_for(post.comments.new, url: post_comments_path(post)) do |form| %> + <%= form.text_field :content, id: :comment_content, class: 'form-control', placeholder: 'Add new Comment' %> + <%= form.submit 'Comment', class: 'btn btn-secondary' %> + <% end %> +
    + <% end %>
  • diff --git a/app/views/users/_user.html.erb b/app/views/users/_user.html.erb index e03c4beb3f..e64b7a5469 100644 --- a/app/views/users/_user.html.erb +++ b/app/views/users/_user.html.erb @@ -2,5 +2,7 @@ Name: <%= user.name %> <%= link_to 'See Profile', user_path(user), class: 'profile-link' %> + + <%= request_status(user) %> \ No newline at end of file diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index e9919805de..ec37835ba1 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -1,5 +1,8 @@

    <%= "Name: #{@user.name}" %>

    + + <%= request_status(@user)%> +

    Recent posts: