mountain_view icon indicating copy to clipboard operation
mountain_view copied to clipboard

Gem to Gem Conflict - Ransack v Mountain View

Open ChristineP2 opened this issue 6 years ago • 1 comments

Interesting thing happened today. We started receiving the error undefined local variable or method '_component' for #<#<Class:0x00007fb63c295be0>:0x00007fb645fcb180> in a page where we used both a component with the following properties defined properties :type, :title, :body, :url, :card_classes and a ransack sort call sort_link(@ransack_object, :foo, 'bar'))

When I dug into the form_helper within ransack and went to the sort_link method, I found that they had a call to an internal method to create the url `url(routing_proxy, s.url_options).

When the url method from ransack was called, mountain_view returned the error mentioned above from presenter.rb.

So now for my (possibly naive) question: Is there some way we can better encapsulate the MV components so that they don't end up trying to stomp on other gems?

ChristineP2 avatar Jul 25 '19 19:07 ChristineP2

Hi @ChristineP2,

Thanks for reporting this issue. I'd definitively like to avoid conflicts with other gems. Do you mind creating a small sample repo with a reproducible case of this issue? That'd help tremendously in understanding where the issue comes from so we can rearchitect were needed.

kitop avatar Oct 12 '19 15:10 kitop