-
Notifications
You must be signed in to change notification settings - Fork 172
Conversation
Good catch! This is a very good improvement. And you're totally right about Thanks a million times for this PR! 👍 |
Hey @volmer, any reason this hasn't been merged yet? |
Amazing work, @rzane. Sorry for the delay, I wasn't aware you've updated it. Could you please fix the conflicts so I can proceed with the merge? |
Absolutely. I'll rebase asap. |
Reset the gallery after pressing the refresh button No need for class_eval when extending ActiveSupport::Concern
Remove the update route Add upload spec for invalid w/ url
I can squash my commits if you'd prefer. This should merge cleanly now. In my most recent commit, I removed update from the routes, since it wasn't in use. I also added a config option for |
Thank you for the hard work! ❤️ |
When a file failed to upload to a gallery, the loading icon would just sit there spinning. The error wasn't being caught. The
imageUploadFailed
function was added because the error behavior was used in multiple places. The problem can be replicated by attempting to upload a file with a strange extension.After handling the errors, the refresh button wasn't being hidden after being clicked. Every time it was clicked, it would refetch the images without clearing the images that were already there.
Also, as far as I know, there's no reason to use class_eval inside the included block when using ActiveSupport::Concern. The included block is for class level macros, like
has_one
orattr_accessor
. No need to put instance methods in the included block.