ruby-on-railsrubyrubygemsbest-in-place

In place editing rails


I receive an error wrong number of arguments (given 1, expected 2..3) how can i apply it in a each loop ? I want to be able to edit it inplace in an each loop

  <%= best_in_place s.message %>

application.js

//= require jquery_ujs
//= require jquery.purr

user.coffee

jQuery ->
 $('.best_in_place').best_in_place() 

version best_in_place 3.1.1

OR

Is there a more better way of implementing an inplace editing


Solution

  • best_in_place(object, field, opts = {})
    

    See the arguments the best_in_place method expects to receive. You're passing only one.

    Most probably you need something like:

    <%= best_in_place @object, :message, as: :input %>