In the process of working through it, I had some questions and started to look for other tutorials. I found a great one at tutsplus, and started working through it.
I am working on the second part of the tutorial and found this interesting bit of code:
What’s confusing about it is that the instance variables are initialized outside of the class
Note. In fact, when I first wrote this, I put the
get "/" do block inside the
Note class. But when I ran it that way, it wouldn’t work. I had to move it out of the class, and now it works!
I am guessing there is some class within Sinatra that’s taking those variables, but that’s just a guess. Anyone have any info about this?
I hope to push this to heroku once it’s ready and I’ll share it here if I do.