So, to create a model, a controller and layout/views, complety
functional, with basic events CRUD(create read update delete) u open a
terminal, get inside the folder of your app, and write
1)ruby script/generate scaffold ModelName column1:type
column2:type …columnN:type and hit enter
The need to specify all the columns when generating is precisely what
I’m hoping to avoid.
When I find some spare time I’ll try this :
use the new-style ‘generate scaffold’ to create a complete example for a table that is not part of my application
use the ‘generate scaffold’ without columns for my real tables
the generated controller doesn’t seem to access the fileds by name, so perhaps the generated controller is not affected by the lack of information about columns
manually add the fields to the views , using code copy-pasted from the complete example
If this works I’ll be able to advance with the application.
now to get u started, the proper way:
- u need to have good undestanding of Ruby code, or at least,
classes, objects, methods.
this type of well grounded info can’t be optained from tutorials, i
have been studying computer science for 4 years, but from good
bucks.And in my oppinion a good ruby book is
I don’t know advanced tricks , but I am familiar with the language.
- a good rails book, which i don’t have a proper example right
now.what i have is Agile Web Development with Rails 3rd Ed, but if u
decide to study it, get ready to meet Hell, no joking
Is the learning curve really painful with Rails ?
I am lacking the time to order books and to properly learn rails : i have
the task to build a web application and have the freedom to choose any
My current intention is to give Rails a try . But if the online documentation
resources prove to be not suitable for a beginner (outdated , or disorganized)
it would be a shame to be forced to move to some other solution only
because it provides a faster startup .
- a good reference :raiisguides, from rub y.com, and
Don’t quite agree with raiscasts, as reference for a noob, not at all.
I’m hoping to be able to find some updated good tutorials that are
not videos. The internet connection that i have at work is totally
unusable for video