[Rails] passing params to controller redirects

2017-06-05 Thread fugee ohu
my index action is looking for params[:club][:genre_id] after a club is successfully added or updated i wanna pass those (nested) params back to my index action so my filter will be set to the right genre_id but clubs_path(:genre_id => @genre_id) after setting @genre_id =

Re: [Rails] How do I make JSON api calls?

2017-06-05 Thread Jason Fleetwood-Boldt
See Net::HTTP. I would send you a link but ruby-doc.org is down You do not need a model, in fact you probably shouldn't have one unless you want to store the data you receive somewhere. (even then you don't need a model) You should think outside of the MVC box. Just because DHH put 3 folders

Re: [Rails] How do I make JSON api calls?

2017-06-05 Thread Colin Law
Oops, ignore me, I forgot which mailing list I was on. I must remember to engage brain before typing, sorry Colin On 5 June 2017 at 21:58, Colin Law wrote: > Where is this API? Is it some s/w running on the same machine as > node-red or a web service or what? Tell us a bit

Re: [Rails] How do I make JSON api calls?

2017-06-05 Thread Colin Law
Where is this API? Is it some s/w running on the same machine as node-red or a web service or what? Tell us a bit more about it. How would the API be called from another application? Colin On 5 June 2017 at 16:56, Charlie Lor wrote: > I'm very new to ruby on rails. I need a

Re: [Rails] Re: http requests

2017-06-05 Thread Hassan Schroeder
On Mon, Jun 5, 2017 at 12:08 PM, Joe Guerra wrote: > Yes, it installed it. > > But the gem is not very well documented. I can't get it to work. That's a shame. If only there were somewhere you could post your failing code and get some other people to help... -- Hassan

Re: [Rails] Re: http requests

2017-06-05 Thread Joe Guerra
Yes, it installed it. But the gem is not very well documented. I can't get it to work. On Friday, June 2, 2017 at 5:07:10 PM UTC-4, Colin Law wrote: > > On 2 June 2017 at 18:23, Joe Guerra > wrote: > > hmm, the canada post gem requires httparty as a runtime

[Rails] How do I make JSON api calls?

2017-06-05 Thread Charlie Lor
I'm very new to ruby on rails. I need a view that will show the data from a JSON API calls. How do accomplish this? Do I need to create a model for this? I assumed the controller is the place to put my API calls code, correct? -- You received this message because you are subscribed to the