user: only provide #show as GET
This commit is contained in:
parent
d572734b96
commit
989873ba62
|
@ -5,8 +5,11 @@
|
|||
|
||||
- if @more_data_available
|
||||
.d-flex.justify-content-center.justify-content-sm-start#paginator
|
||||
= button_to user_path(@user, last_id: @answers_last_id), class: "btn btn-light" do
|
||||
= t("voc.load")
|
||||
= button_to t("voc.load"), user_path(@user),
|
||||
class: "btn btn-light",
|
||||
method: :get,
|
||||
params: { last_id: @answers_last_id },
|
||||
form: { data: { turbo_stream: true } }
|
||||
|
||||
:ruby
|
||||
provide(:title, user_title(@user))
|
||||
|
|
|
@ -4,5 +4,8 @@
|
|||
|
||||
= turbo_stream.update "paginator" do
|
||||
- if @more_data_available
|
||||
= button_to user_path(@user, last_id: @answers_last_id), class: "btn btn-light" do
|
||||
= t("voc.load")
|
||||
= button_to t("voc.load"), user_path(@user),
|
||||
class: "btn btn-light",
|
||||
method: :get,
|
||||
params: { last_id: @answers_last_id },
|
||||
form: { data: { turbo_stream: true } }
|
||||
|
|
|
@ -151,8 +151,8 @@ Rails.application.routes.draw do
|
|||
post "/inbox/create", to: "inbox#create", as: :inbox_create
|
||||
get "/inbox", to: "inbox#show", as: :inbox
|
||||
|
||||
match "/user/:username(/p/:page)", to: "user#show", via: [:get, :post], defaults: { page: 1 }
|
||||
match "/@:username(/p/:page)", to: "user#show", via: [:get, :post], as: :user, defaults: { page: 1 }
|
||||
get "/user/:username(/p/:page)", to: "user#show", defaults: { page: 1 }
|
||||
get "/@:username(/p/:page)", to: "user#show", as: :user, defaults: { page: 1 }
|
||||
get "/@:username/a/:id", to: "answer#show", via: "get", as: :answer
|
||||
match "/@:username/q/:id", to: "question#show", via: [:get, :post], as: :question
|
||||
match "/@:username/followers(/p/:page)", to: "user#followers", via: [:get, :post], as: :show_user_followers, defaults: { page: 1 }
|
||||
|
|
Loading…
Reference in New Issue