diff --git a/app/controllers/profiles_controller.rb b/app/controllers/profiles_controller.rb index d802715..b563090 100644 --- a/app/controllers/profiles_controller.rb +++ b/app/controllers/profiles_controller.rb @@ -1,4 +1,8 @@ class ProfilesController < ApplicationController + def index + @profiles = Profile.all + end + def show @profile = Profile.find params[:id] end diff --git a/app/views/profiles/index.html.erb b/app/views/profiles/index.html.erb new file mode 100644 index 0000000..52130c1 --- /dev/null +++ b/app/views/profiles/index.html.erb @@ -0,0 +1,9 @@ +

Profiles

+ +<% if @profiles.present? %> + +<% end %> diff --git a/config/routes.rb b/config/routes.rb index a03c68a..b3810bf 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,5 +1,5 @@ Rails.application.routes.draw do root to: 'home#show' - resources :profiles, only: :show + resources :profiles, only: %i[index show] end