What I don’t understand is that there’s a Call class (model), but
there’s
no Calls model. How in the world can there be an instance of a class,
Calls, which doesn’t exist?
Clearly, class Calls does exist – this must be the magic of rails, what
rails does for me. I dunno, too easy.
There is no Calls class. what makes you think here is one ?
When the show uses @shows, doesn’t the “@” indicate instance
variable? I would think that @shows is an array, and yes it’s an
object so, in that sense, I guess, is an instance variable of Array.
There is no Calls class. what makes you think here is one ?
When the show uses @shows, doesn’t the “@” indicate instance
variable? I would think that @shows is an array, and yes it’s an
object so, in that sense, I guess, is an instance variable of Array.
Well yes @calls is an instance variable (of an instance of your
controller), but that’s got nothing to do with their being or not a
Calls class. And it’s definitely not an instance variable of Array
(unless you meant that it’s an instance variable that happens to be an
array)
Why is the “@” required in this case?
Well if there was no @ then it wouldn’t be an instance variable and so
your view wouldn’t be able to play with it
Fred
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.