Invoking helpers from API controller actions
You have an API endpoint that needs to update little parts of the page via JS, and creating a partial is really overkill.
You can use view_context in your controller to access all your and Rails helpers.
Most useful in ActiveAdmin Member/Collection Actions :-)
Written by Marcello Barnaba
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#