Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/best_in_place/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def best_in_place(object, field, opts = {})
value = value.to_s
collection = best_in_place_default_collection if collection.blank?
collection = best_in_place_collection_builder(type, collection)
display_value = collection.flat_map{|a| a[0].to_s == value ? a[1] : nil }.compact[0]
display_value = collection.flat_map{|a| a[0].to_s == value ? a[1] : nil }.compact[0] unless opts[:display_as]
collection = collection.to_json
options[:data]['bip-collection'] = html_escape(collection)
end
Expand Down