spohlenz / tinymce-rails

Integration of TinyMCE with the Rails asset pipeline
Other
813 stars 256 forks source link

Rails 6.1 bug with content_css option specified #274

Closed javinto closed 3 years ago

javinto commented 3 years ago

When I specify the content_css option in the tinymce.yml options file like so:

content_css: 'tinymce_content.css'

I run into a 'wrong number of arguments (given 1, expected 3)' from within the tinymce() view helper. The error is triggered by the lib/tinymce/rails/configuration.rb file line 51: helpers = ActionView::Base.new(ActionView::LookupContext.new([]))

The reason is that in Rails 6.1 the initialize method of ActionView::Base completely changed into 3 required parameters. From ActionView::Base code

Rails 6 def initialize(lookup_context = nil, assigns = {}, controller = nil, formats = NULL)

Rails 6.1 def initialize(lookup_context, assigns, controller)

Configuration: Rails 6.1rc2 Sprockets 4.x

spohlenz commented 3 years ago

Thank you for reporting. This should now be fixed in 5.6.2.1.