bernat / best_in_place

A RESTful unobtrusive jQuery Inplace-Editor and a helper as a Rails Gem
http://blog.bernatfarrero.com/in-place-editing-with-javascript-jquery-and-rails-3/
1.2k stars 572 forks source link

Rails 4 - wrong url #451

Closed olegsobchuk closed 9 years ago

olegsobchuk commented 9 years ago

Hi! I'm using rails 4.2 When I use bip, I get wrong path (also if add url: ..., or path: ... attributes) I get method put, to index. example: edit User object, get users_path with method put Can you help me? Thx!

seuros commented 9 years ago

did you add jquery-ujs ?

olegsobchuk commented 9 years ago

yep ../app/assets/javascripts/application.js.coffee //= require jquery_ujs

seuros commented 9 years ago

can you provide a sample app with this bug ?

olegsobchuk commented 9 years ago

unfortunately this is private repo (( maybe it does not work with rails 4?

seuros commented 9 years ago

I said to provide a sample app, not the repo.

Create a new rails 4.2 app and reproduce the bug in it.

olegsobchuk commented 9 years ago

Oh, I see! https://github.com/olegsobchuk/example_app git@github.com:olegsobchuk/example_app.git

from console: ActionController::RoutingError (No route matches [PUT] "/users")

chevinbrown commented 9 years ago

What's the status here?? I'm having same issue, rails 4.2, ruby 2.2.1. the data attribute is "data-bip-url", but if I change that to "data-url", it works.

olegsobchuk commented 9 years ago

still open, I declined BIP and wrote edit in line via JS BIP is broken for Rails 4

chevinbrown commented 9 years ago

Is there a Rails 4 branch we can use?

duffyjp commented 9 years ago

I use this fork:

gem 'best_in_place', github:'widernet/best_in_place', branch: 'rails-4'         

It works fine in 4.1.5... for what I need anyway.

https://github.com/widernet/best_in_place/tree/rails-4

stereodenis commented 9 years ago

@olegsobchuk where is best_in_place gem in your Gemfile?

stereodenis commented 9 years ago

@duffyjp I want to help with improving this gem, so I need sample apps, that reproduced the issue

olegsobchuk commented 9 years ago

@stereodenis not works, can you investigating my problem? https://github.com/olegsobchuk/example_app User.create(name: 'Some name', email: 'my@e.mail')

stereodenis commented 9 years ago

@olegsobchuk I can, but you remove bip gem

olegsobchuk commented 9 years ago

@stereodenis sorry, fixed

stereodenis commented 9 years ago

@olegsobchuk https://github.com/olegsobchuk/example_app/pull/5

olegsobchuk commented 9 years ago

thanks, @stereodenis!!! Result: you have to use gem 'best_in_place', github: 'bernat/best_in_place'