second_pagesのheaderへaboutボタンを追加したのですが、homeのページからaboutボタンを押してaboutページへアクセスできるようにするにはroutesはどのように書けばいいですか?
ちなみに/second_pages/aboutでURLに書くとページは表示できます。
現在のroutes
match '/about', to: 'second_pages#about', via: 'get'
こちらで入力するとrouting error / No route matches [GET] "/about_path"になっています。
現在のsecond_pages_controller.rb
class SecondPagesController < ApplicationController
def home
if signed_in?
@micropost = current_user.microposts.build
@feed_items = current_user.feed.paginate(page: params[:page])
end
end
def help
end
def about
end
end
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。