Ruby on Rails Tuesday, October 21, 2014

Ok so I figured out what I did wrong sorta, the way the call was being made didnt work so I did this
  def create
    @shops = []
    @client = GooglePlaces::Client.new('AIzaSyCC5Dyjn5_gGSKZMVJqF6tKOYOaxgUMJ8s')
    @shops = @client.spots_by_query('coffee near ' + @location.address)
  end

now my next (and I think last problem) is in my input form I assumed that was setting @location's address to w/e the string in the input field is but it's saying it's nil??

in my index I'm calling @location = Location.new, then I thought I was setting @location.address to "input value from form", what am I missing?

--
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 an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/3ca264d3-81b2-4dd1-819a-27a8a3a621f3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment