1

gryzzly is told me to update my best_in_place version from github, in order to solve this: Checkboxes with images

He told to update from github, because there is no release with this fix yet.

so, I wrote in my Gemfile:

gem 'best_in_place', :git => 'git://github.com/bernat/best_in_place.git'

and then run: bundle install.

this is not fix my problem: show-images-in-checkbox-collection, so I think I did something wrong.

please help.

Community
  • 1
  • 1
Maor Cohen
  • 936
  • 2
  • 18
  • 33

1 Answers1

1

Try to add the branch you think is proper . In your case :

gem 'best_in_place', :git => 'git://github.com/bernat/best_in_place.git', :branch => 'fix-display-methods'

EDIT : Researching the commits , it appears that the correct entry in Gemfile is :

gem "best_in_place",:git => 'git://github.com/bernat/best_in_place.git', :tag => "0665b5f2e41967d8d1616f953fa3c0983cef1d51"

I hope this will solve your problem.

EDIT 2 : Today I've replicated your code on my machine and it works perfectly . The tag appears to be correct , only one slight thing in your code seems confusing : In Rails > 3 the reference to the image is simply image_tag("your_img.png") . Your code should be :

<%= best_in_place task, :done,:classes => 'highlight_on_success', type: :checkbox, collection: [image_tag("checkbox_no.png"), image_tag("checkbox_yes.png")] %>

Good luck .

R Milushev
  • 4,295
  • 3
  • 27
  • 35
  • I'm trying. if you can, please tell me how can you find this tag. I want to know how to fix the same things next time :] thank you.. – Maor Cohen Jan 11 '13 at 00:19
  • You should find the github place of the gem , in your case `https://github.com/bernat/best_in_place` and you look for `commits` tab . There is a chronology with meaningful labels of the commits . On the right of the commit , there is a clickable area , you click there and browse the commit code . There is a long combination of numbers and letters , which you use it in your Gemfile as `:tag` . Now I am sure you'll find the right commit and it's gonna be OK. – R Milushev Jan 11 '13 at 00:29
  • Ok, thank you.. I will try and hope to find it. thank you! (I will update this topic). – Maor Cohen Jan 11 '13 at 00:33