vendredi 8 mai 2015

How to add extra param on best_in_place field update in ruby

I am using best_in_place gem for In-line edit for a field in active admin. Please look at my code below,

column "Badge ID", :number do |event|
   best_in_place event, :number, :type => :input, :path => [:admin, event]
end

This is what the parameters sent to the controller action.

Parameters: {"event"=>{"number"=>"499"}, "authenticity_token"=>"xxxxxxxx", "id"=>"995"}

Now, I want to send additional parameter along with the number either inside or outside the event hash.

Anyone, Please help me resolve this.

Aucun commentaire:

Enregistrer un commentaire