You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want routes like /blog/posts/1-hello-world instead of /blog_posts/hello-world.
To achieve that:
Remove/comment out all routing code in vendor/plugins/blog_kit/config/routes.rb
Draw custom routes like this in config/routes.rb:
scope 'blog' do
resources :posts, :controller => 'blog_posts', :as => 'blog_posts' do
resources :comments, :controller => 'blog_comments', :as => 'blog_comments'
resources :images, :controller =>'blog_images', :as => 'blog_images'
collection do
get :drafts
end
member do
get :tag
end
end
end
match 'blog' => 'blog_posts#index'
The text was updated successfully, but these errors were encountered:
I want routes like
/blog/posts/1-hello-world
instead of/blog_posts/hello-world
.To achieve that:
Remove/comment out all routing code in
vendor/plugins/blog_kit/config/routes.rb
Draw custom routes like this in
config/routes.rb
:The text was updated successfully, but these errors were encountered: