#Version for ipad
version :ipad_main do
process crop: :image
end
#Set crop versions for example in _ipad.html.erb partial
<%= f.cropbox :avatar, only: :ipad_main %>
#Version for android
version :android_main do
process crop: :image
end
#Set crop versions for example in _andtoid.html.erb partial
<%= f.cropbox :avatar, only: :android_main %>
#or both
<%= f.cropbox :avatar, only: [:ipad_main, :android_main] %>
If you need to html data attributes you can set data option
<%= f.cropbox :avatar, data: {width: 1024, height: 768} %>
#and you can use it in javascript
You can set versions where need to crop.
If you need to html data attributes you can set data option