Bodacious/blogit

paths incorrect?

Opened this issue · 8 comments

Hi Gavin, great gem. Thanks for maintaining this. I'm using rails 3.2

I'm trying to add it to my existing project. I did the installation properly as detailed in the README. I have added

mount Blogit::Engine => "/blog", as: :blogit

to my routes.rb

When I go to "/blog" on my development server, the link to the "New Blog Post" is:

http://xxxx/blog/assets?action=new&controller=blogit%2Fposts and thus errors out

When I go to http://xxxx/blog/posts/new directly, I see the form, but the form action is

/blog/assets?controller=blogit%2Fposts

I think I'm not understanding something about mounting Engines and how they affect paths. Do you have any ideas? Thanks a lot

@keenahn very unusual - which version of Rails and Blogit are you using?

blogit (0.8.0)
rails (3.2.17)

I tried removing everything from my routes file except for that, and it did the same thing.

Can you paste the relevant parts of the output from
$ rake routes

blogit        /blog                                            Blogit::Engine
...
Routes for Blogit::Engine:
                         /posts/page/:page(.:format)            blogit/posts#index
tagged_blog_posts        /posts/tagged/:tag(.:format)           blogit/posts#tagged
    post_comments POST   /posts/:post_id/comments(.:format)     blogit/comments#create
     post_comment DELETE /posts/:post_id/comments/:id(.:format) blogit/comments#destroy
            posts GET    /posts(.:format)                       blogit/posts#index
                  POST   /posts(.:format)                       blogit/posts#create
         new_post GET    /posts/new(.:format)                   blogit/posts#new
        edit_post GET    /posts/:id/edit(.:format)              blogit/posts#edit
             post GET    /posts/:id(.:format)                   blogit/posts#show
                  PUT    /posts/:id(.:format)                   blogit/posts#update
                  DELETE /posts/:id(.:format)                   blogit/posts#destroy
        blog_root        /                                      blogit/posts#index

Hey, thanks a lot Gavin. I really appreciate your help! It's not that many people who would be so responsive on an open source gem :)

@keenahn Sorry, I lost track of this issue.

Did you ever resolve it?

I am having this issue as well :-(

I'm having exactly the same issue (6 years later!) but with a completely different gem (Blazer). Sorry to revive a dead thread but does anyone know why engine routes output /assets?action=new&controller=...?

@archonic Can you please provide the following:

  • Output of bundle list
  • Contents of your routes.rb file
  • Output of rails routes

Thanks!