Advertisement
Guest User

Untitled

a guest
Sep 17th, 2013
3,978
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. http://192.168.2.20:8080/Location/new/123.123,-123.123/
  2.  
  3. map.connect '/Location/new/:coords/', :controller => 'Location', :action => 'new', :coords => /d+.d+,-d+.d+/
  4. map.connect '/Location/list/', :controller => 'Location', :action => 'list'
  5. map.connect '/Location/create/', :controller => 'Location', :action => 'create'
  6.  
  7. def new
  8. @coords = Location.new(params[:coords])
  9. end
  10.  
  11. NoMethodError in LocationController#new
  12. undefined method `stringify_keys!' for "123.123,-123.123":String
  13.  
  14. def new
  15. @location = Location.new( { :coords => params[:coords] } )
  16. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement