janx / rails_admin_jcrop

Jcrop plugin for RailsAdmin, enable image cropping function on image fields.
MIT License
47 stars 63 forks source link

Javascript error error: Uncaught SyntaxError: Unexpected token & #35

Open clwillingham opened 6 years ago

clwillingham commented 6 years ago

in rails 5.1.4 when the jcrop options is set as

field :poster do
  jcrop_options aspectRatio: 500.0/320.0
end

the jcrop_options javascript line is rendered as

var rails_admin_jcrop_options = "aspectRatio: 500/320";

this could be related to this: https://github.com/haml/haml/issues/940

Cremz commented 6 years ago

just wanted to try this gem and ran into the same issue. does your fix actually work @clwillingham ?