|
|||||||||
RubyMine IDE tips
How to create a Model (example: Model User)STEP 1 CREATE User MODEL:
RubyMine: Tools-> Run Rails Generator -> model >>> give it the name Use This will create a migration file with a name something like 20120330202846_create_users.rb in the directory db/migrate. It will also create an initial model file app/models/user.rb. user.rb = Model class file
How to create a ContollerEXAMPLE Create Controller class named "SayController" (command line> rails generate controller say -s)
How to Create A ViewEXAMPLENow create an HTML view file in app/views and make it an ERB file and call it hello.html.erb
Viewing Database TablesTo start: View->Tool Windows->DatabaseYou will get (you must have drivers for the database you are using to connect to it ---RubyMine will usually prompt you or have a link to install them if you don't have them on there)To manually add the default SQLite3 database table so you can viewNOW open it up and see your database tablesYou can select a Table and then enter in values by hand if you wish |
|||||||||
© Lynne Grewe |