Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No compatibility with Rails >5.0 #70

Open
tB0nE opened this issue Nov 11, 2017 · 2 comments
Open

No compatibility with Rails >5.0 #70

tB0nE opened this issue Nov 11, 2017 · 2 comments

Comments

@tB0nE
Copy link

tB0nE commented Nov 11, 2017

"ActionDispatch::Callbacks.to_prepare do" in init.rb is depreciated, I believe it can just be replaced with:

"ActiveSupport::Reloader.to_prepare do"

"alias_method_chain :save_attachments, :pasted_images" in attachment_patch.rb is depreciated (alias_method_chain), it needs to be replaced with Module#prepend but I don't know ruby so I don't really know how to do this.

@SeparateReality
Copy link

I am not familiar with ruby either. Came a bit futher but something is still missing:

  1. I replaced ActionDispatch::Callbacks.to_prepare do in init.rb with
    ActiveSupport::Reloader.to_prepare do
    I guess that's the easy part.

  2. Using Module#prepend instead of alias_method_chain probably needs some more rework.
    Looking at this post https://littlelines.com/blog/2018/01/31/replace-alias-method-chain
    I tried the following in attachement_path.rb (to replace alias_method_chain)

alias_method :save_attachments_without_pasted_images, :save_attachments
alias_method :save_attachments, :save_attachments_with_pasted_images

Now the errors are gone but when pasting an image it is not saved....

Would be great if someone could resolve this issue. Otherwise this fantastic plugin wont work with Redmine >= 3.4.5

@kzalewski
Copy link

The pull request from Utopism (PR #80) resolves this issue. I urge the author of clipboard_image_paste to please approve and merge this pull request as soon as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants