Ruby on Rails Developement with Aptana Radrails by Kevin English Camber Corporation Overview

Ruby on Rails Developement with Aptana Radrails by Kevin English Camber Corporation Overview

Ruby on Rails Developement with Aptana RadRails by Kevin English Camber Corporation Overview Short intro to Ruby. Short intro to Rails. Build a small Rails app with Aptana. What is Ruby? Object-Oriented Language Interpreted, No compiler Dynamically typed reflective Powerful iterators and code block support IRB Demo What is Rails? MVC ActiveRecord (ORM) ActionPack (controller, http request/responses) ActionView (Html Templating) Database Migrations 1,000s of plugins No Jars, No XML http://www.youtube.com/watch?v=PQbuyKUaKFo Aptana Studio Full Feature Web development environment Built-on Eclipse Includes support for Php, Javascript, Ruby on Rails & Python. Creating a Rails Application Click File -> New -> Rails Project For quick setup, use sqlite. Generate Some Models Click ”Console” tab script/generate model post title:string body:text or script/generate resource post title:string body:text Resource adds restful route. Generate the Database From Rails Console: rake db:migrate Edit Model, add validations. Edit Controller and View Use Aptana H/T/M/V/C Add 'new' method to app/controllers/posts_controller.rb Preview page in Aptana browser. Add 'new' view file Add create action Add create action to posts_controller Add Show Action Add show action to posts_controller Talk about RESTFUL routes rake routes Add new create with format Add fields to post script/generate migration add_author_to_post author:string Add field to create and show Adding an Index Add index action to controller Add _post partial Edit show & index Add New Route Edit config/route.rb Delete public index.html Adding a Layout Add files to app/views/layout posts.html.erb If layout file for controller exists, that will be used. Adding Comment script/generate resource comment rake db:migrate Edit Comment model Edit Post model. Add comments to post controller and post ”show” view. Add create action to comment_controller. Testing Add shoulda test plugin http://www.thoughtbot.com/projects/shoulda run rake db:test:prepare Edit comment_test.rb and post_test.rb.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    18 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us