Joined April 2021
·
Sebastian Velandia
Posted to
Simple Ajax calls in Rails
over 1 year
ago
Hey bro, you should not define the class "OnlyAjaxRequest" within the routes block... Defining a class withing a block is a bad practice.
Hey bro, you should not define the class "OnlyAjaxRequest" within the routes block... Defining a class withing a block is a bad practice.
I also think you missed the 'data' param in the ajax call so the controller can have access to the parameter :local_id