The amazing thing i was mentioning in last post is "Scaffolding" . Not just scaffolding, but how it adjusts so nicely .
I used,
rails generate scaffold stickynotes
what Rails did is create Stickynote.rb as model and stickynotes_controller.rb as controller. I was wondering how did it automatically made the model as singular. I decided to experiment and did this,
rails generate scaffold bus
and i half expected it to create a model called bu. But it made the model as bus.rb and the controller as buses_controller.rb. Great work pluralizing!!
It also underlines one important point. In rails its all about conventions.
Into my second day in learning rails i feel the learning curve is pretty steep. And the reason for that according to me is the stress on conventions. There are lots and lots of conventions adopted and to be followed.
Will post more about concepts in posts to come !
I used,
rails generate scaffold stickynotes
what Rails did is create Stickynote.rb as model and stickynotes_controller.rb as controller. I was wondering how did it automatically made the model as singular. I decided to experiment and did this,
rails generate scaffold bus
and i half expected it to create a model called bu. But it made the model as bus.rb and the controller as buses_controller.rb. Great work pluralizing!!
It also underlines one important point. In rails its all about conventions.
Into my second day in learning rails i feel the learning curve is pretty steep. And the reason for that according to me is the stress on conventions. There are lots and lots of conventions adopted and to be followed.
Will post more about concepts in posts to come !
No comments:
Post a Comment