Respect pagination_options[:renderer] #176
This is related to the pull request I made earlier, it respects
There are few things wrong with your patch. First, you're not guarding yourself from editing options objects passed in from outside to the
But, since the last time I've talked I have thought a lot about this and related issues and I realized I can't encourage people to set a global link renderer. This is because of Rack apps mounted inside of each another, like Sinatra inside Rails. If a Rails user set a global link renderer that works with Rails url helpers, that link renderer would implicitly be used in Sinatra and break. The proper way of setting a default link renderer for your application would be wrapping the
So, I'm going to change the code to deprecate the global option and close this. Sorry about wasting your time, but even I didn't predict these problems.
Because lately it's popular to mount different web frameworks in the same Ruby process (e.g. Sinatra apps beside Rails), a global link renderer option is useless since it would affect all frameworks but it's hardly possible that a single renderer will work in all of these frameworks. See resolution for #176