watermarkchurch / wcc-contentful

An alternative to Contentful's contentful.rb ruby client, contentful_model, and contentful_rails gems all in one.
MIT License
2 stars 1 forks source link

Unisolate the namespace #132

Closed jpowell closed 5 years ago

jpowell commented 5 years ago

https://guides.rubyonrails.org/engines.html#routes

If you look at the engines docs for rails, the recommended implementation for an engine is to specify isolate_namespace SomeEngineName. There is a subtlety that requires you to specify main_app.url_helper_x in any view or partial that is rendered by engine machinery... we felt as if the gem should handle the heavy lifting and not require the client application to know that the engine has such nuances. This requires you to specify the namespace in places like routes, controller references, view paths, etc -- in the gem. See subtle paragraph that took some time to find(from the doc above):

If a template rendered from within an engine attempts to use one of the application’s routing helper methods, it may result in an undefined method call. If you encounter such an issue, ensure that you’re not attempting to call the application’s routing methods without the main_app prefix from within the engine.

watermarkchurch-bot commented 5 years ago
1 Message
:book: PR is classed as Work in Progress

Generated by :no_entry_sign: Danger

coveralls commented 5 years ago

Coverage Status

Coverage decreased (-0.01%) to 94.884% when pulling 0e7177a9a089302a82d9fdad6986e35e316283d6 on unisolate into 6b9ec957f528e7cf9c11fbedb1287bbe36fe3c98 on master.