Open d33pjs opened 7 years ago
@bernat @Havoc85 facing same issue any solution for this???, i am also trying similar thing
In view
schedule.legs.each_with_index do |leg, index|
%tbody
%td= best_in_place schedule, :legs, as: :input,:display_as => location(schedule, index), url: abc_fields_path(id:schedule.id),:value=>leg["location"]
In helper
def location(schedule, index)
schedule.legs[index]["location"]
end
Error
undefined method `ABC' for #<Class Name>
Where legs is a json field which is an array of hashes which iam iterating over it
Hello,
display_as doesnt seem to work in my case:
notes_controller.rb:
application_helper.rb:
_note.html.erb:
Errormessage:
I also tried it with
display_with
andhelper_options
, but than, i get an argument exception.I tought, its the same as in this example: http://stackoverflow.com/questions/22565409/how-to-pass-variables-to-a-best-in-place-display-as-custom-method
But its not working.
Thanks and Regards, Jens