more migrating views, get user search working
This commit is contained in:
@@ -18,34 +18,56 @@ Rails.application.routes.draw do
|
||||
end
|
||||
end
|
||||
|
||||
resources :domain_users,
|
||||
only: [:index],
|
||||
resources :users,
|
||||
only: %i[index show],
|
||||
controller: "domain/users",
|
||||
path: "users"
|
||||
|
||||
resources :domain_posts,
|
||||
only: %i[index],
|
||||
controller: "domain/posts",
|
||||
path: "posts"
|
||||
|
||||
Domain::RouteHelper::DOMAIN_USER_RESOURCES.each do |resource_data|
|
||||
resources resource_data.resource_name,
|
||||
only: [:show],
|
||||
param: resource_data.param,
|
||||
controller: resource_data.controller,
|
||||
path: "users/#{resource_data.subpath}"
|
||||
end
|
||||
|
||||
Domain::RouteHelper::DOMAIN_POST_RESOURCES.each do |resource_data|
|
||||
resources resource_data.resource_name,
|
||||
only: %i[show],
|
||||
param: resource_data.param,
|
||||
controller: resource_data.controller,
|
||||
path: "posts/#{resource_data.subpath}" do
|
||||
get :faved_by, on: :member
|
||||
constraints: {
|
||||
id: %r{[^/]+/[^/]+},
|
||||
} do
|
||||
get :search_by_name, on: :collection
|
||||
resources :posts, only: [:index], controller: "domain/posts" do
|
||||
get :favorites, on: :member
|
||||
end
|
||||
end
|
||||
|
||||
resources :posts,
|
||||
only: %i[index show],
|
||||
controller: "domain/posts",
|
||||
constraints: {
|
||||
id: %r{[^/]+/[^/]+},
|
||||
} do
|
||||
get :faved_by, on: :member
|
||||
end
|
||||
|
||||
# Domain::RouteHelper::DOMAIN_POST_RESOURCES.each do |resource_data|
|
||||
# resolve resource_data.klass.name do |post|
|
||||
# domain_post_path(post)
|
||||
# end
|
||||
# end
|
||||
|
||||
# Domain::RouteHelper::DOMAIN_USER_RESOURCES.each do |resource_data|
|
||||
# resources resource_data.resource_name,
|
||||
# only: [:show],
|
||||
# param: resource_data.param,
|
||||
# controller: resource_data.controller,
|
||||
# path: "users/#{resource_data.subpath}" do
|
||||
# resources :posts,
|
||||
# controller: "domain/posts",
|
||||
# only: %i[index],
|
||||
# path: "posts"
|
||||
# end
|
||||
# end
|
||||
|
||||
# Domain::RouteHelper::DOMAIN_POST_RESOURCES.each do |resource_data|
|
||||
# resources resource_data.resource_name,
|
||||
# only: %i[show],
|
||||
# param: resource_data.param,
|
||||
# controller: resource_data.controller,
|
||||
# path: "posts/#{resource_data.subpath}" do
|
||||
# get :faved_by, on: :member
|
||||
# end
|
||||
# end
|
||||
|
||||
namespace :domain do
|
||||
namespace :fa do
|
||||
resources :users,
|
||||
|
||||
Reference in New Issue
Block a user