Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No route matches [POST] "/xxxx/3/edit" #2293

Closed
charly-palencia opened this issue May 9, 2015 · 2 comments
Closed

No route matches [POST] "/xxxx/3/edit" #2293

charly-palencia opened this issue May 9, 2015 · 2 comments

Comments

@charly-palencia
Copy link

Description

When i tried to edit some of my products or categories i got a POST RoutingError. I expect it sends the request to the PUT action but it doesn't. what do i miss? PATH action probably? i'm not sure.

Started POST "/admin/product/3/edit" for ::1 at 2015-05-09 10:35:43 -0500

ActionController::RoutingError (No route matches [POST] "/admin/product/3/edit"):
  actionpack (4.2.0) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
  actionpack (4.2.0) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
  railties (4.2.0) lib/rails/rack/logger.rb:38:in `call_app'

Versions

Rails 4.2
Rails_admin 0.6.7

router.rb

  root :to => redirect('/admin')
  namespace :api do
    namespace :v1 do
      resources :categories
      resources :products
    end
  end

  mount RailsAdmin::Engine => '/admin', as: 'rails_admin'

initializer/rails_admin.rb

  config.actions do
    dashboard                     # mandatory
    index                         # mandatory
    new
    export
    bulk_delete
    show
    edit
    delete
    show_in_app
@mshibuya
Copy link
Member

Can you create minimal app to reproduce this problem?

@charly-palencia
Copy link
Author

@mshibuya thanks for your replay. I fixed my issues while i was creating my new app :)

Apparently my problem was about a conflict with rails-api. I tried with this but it doesn't work. So, i figured it out with this:

Gemfile

gem 'rails-api', require: false 

api_base_controller file

require 'rails-api'

Thanks you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants