1 / 11

ROR

ROR. Ruby & Database. RailsInstaller Ruby 1.9.3 Rails 3.2 SQlite 3 Git SQL Server Adapter. Build a Rails application Cmd mkdir ROR cd ROR rails new blog cd blog bundle install. Start Server rails server http://localhost:3000. First application on Rails.

lois
Download Presentation

ROR

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ROR

  2. Ruby & Database • RailsInstaller • Ruby 1.9.3 • Rails 3.2 • SQlite 3 • Git • SQL Server Adapter

  3. Build a Rails application • Cmd • mkdirROR • cd ROR • rails new blog • cd blog • bundle install

  4. Start Server • rails server • http://localhost:3000

  5. First application on Rails • Hello World! • rails generate controller blogs • config\routes.rb • controllers\blogs_controller.rb

  6. View • cd views\blogs • fsutilfile createnewindex.html.erb 1024

  7. Model • rails generate model post • cd db\migrate\XXXXX_create_posts.rb

  8. Model • cd blog • rake db:migrate • app/controllers/blogs_controlle.erb app/views/blogs/new.html.erb app/views/blogs/index.html.erb app/views/blogs/edit.html.erb app/views/blogs/show.html.erb http://rails.pixnet.net/blog/post/22955992

  9. new.html.erb

  10. edit.html.erb

  11. blogs_controller.rb

More Related