Open OlegPasko opened 10 years ago
My fix is pretty hacky. Hopefully someone from the madebymany team will come along and clean it up. I'm not specifically sure what's wrong with your code, everything's working for me in production. One correction though:
<%= f.sir_trevor_text_area :json_body, input_html: {} %>
This is how you add html addtributes. So for you it would be: <%= f.sir_trevor_text_area :content, input_html: {rows: 10, class: 'form-control'} %>
You also really don't need the rows and class attributes though as sir-trevor hides the textarea.
edit: also, let me know if you're just using the pull request, or my fork, they are slightly different, I can only confirm that my comments work for my fork
Oops, html is atavism from text_input. I'm using your fork.
Maybe it is another problem... I'm using gem without require 'sir-trevor-rails'
in application controller, it works nice in development. When I use require, it is an error with Unicorn in production appears.
Thanks.
It is problem in Unicorn. I just needed to stop and start (not restart) server :)
Some offtop... @maxmcd, why are you skip Gallery functionality https://github.com/madebymany/sir-trevor-rails/blob/master/app/assets/javascript/sir-trevor/sir-trevor.js#L1083 ? :)
@OlegPasko That's from an older version of sir-trevor.js, it looks like they were planning on including galleries and then dropped the functionality. The newest version of the library doesn't have any reference to galleries.
Using sir-trevor-rails with fix by @maxmcd (https://github.com/maxmcd/sir-trevor-rails). Working well in development, but in production I have
What can I miss?