I want to query to a rest api, passing paramateres in the link like ransack gem.
Is there any way to integrate the ransack gem, quering through a rails client (with activeresource) to a REST API?
I didn't find any manual about this.
I want to query to a rest api, passing paramateres in the link like ransack gem.
Is there any way to integrate the ransack gem, quering through a rails client (with activeresource) to a REST API?
I didn't find any manual about this.
I would recommend adding this method:
By using the
.to_query
method you are able to encode the params you want to send, but it's more obscured than simply sending them in the request URL. I admit I am not terribly familiar with the ransack gem, but if you simply want to pass a JSON of your parameters to an API this is a good way to do just that