I spent about an hour trying to figure out why Sinatra app was spinning off the track. Basically after the update call(
put), Region model started to misbehave.
1 2 3
1 2 3 4 5 6 7 8 9 10
Do you see any problem in above code?
Well the problem lies with
Region = Region.find(params[:id]). I redefined the class inadvertently. Yes, you can do that. Java fanboys I am not lying. Try Ruby, and welcome to the hell!