[Rails] Re: Is there any tool to convet ActiveRecord 2.3.5 statement to sql

2018-04-14 Thread kaine wright
This may help http://guides.rubyonrails.org/v2.3.11/active_record_querying.html what is it you are trying to convert. Do you mean you wish to add a column to your database to store information if so you would use your model and migrations -- You received this message because you are

[Rails] Re: SEEKING RoR developers

2018-04-12 Thread kaine wright
Hi Sergio id be very interested im average at rails but learn fast but i work with arduino's and raspberry pi's quite often. One of my latest projects was figuring out the best way to control a drone using 4g cellular data a modified version of MultiWii. My linkedin here

[Rails] Re: Looping and selecting

2018-04-12 Thread kaine wright
In my pagecontentController i have index and show. for index its def index @keyword = "Arduino" webhoseio = Webhoseio.new(' # { ENV [ ' APIKEY2 ' ] } ' ) @output = webhoseio.query('productFilter', {'q': @keyword}) end def show @output['products'][:id] end

[Rails] Re: Looping and selecting

2018-04-12 Thread kaine wright
On Wednesday, April 11, 2018 at 7:10:53 PM UTC+8, dasibre wrote: > > How are you looping through the result. When you say you are unable to > loop through, what do you mean exactly, what error are you getting > > Hi thanks for the reply. Ive been trying to loop through like so <%

Re: [Rails] Looping and selecting

2018-04-12 Thread kaine wright
Hi thanks for the reply id over looked that completely. what solved this was @output['products'][0]['images'].first -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send

[Rails] Re: Compare hashes and report where the change was

2018-04-11 Thread kaine wright
If you want to get what is the difference between two hashes, you can do this: result = {} hash1.each {|key, value| result[key] = hash2[key] if hash2[key] != value } puts result or use a this hash1.to_a == hash2.to_a turning it to an array and compairing those. or you could use to_s

[Rails] Looping and selecting

2018-04-10 Thread kaine wright
i have this output from an api call @output['products'][0] =>