• Like
RoR traning workshop (Level 1)
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

RoR traning workshop (Level 1)

  • 858 views
Published

Overview of RoR …

Overview of RoR
Setting up Environment
Ruby Language
MVC – ActiveRecord, ActionController, ActionView
REST Architecture
Routing
DB Migrations
ActiveRecord Associations
Validation/Validation Helpers
Forms/ActionView helpers
Assets/Bundler
Caching
Debugging
RoR Quick-start Demo

Published in Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
  • Very Helpful!
    Are you sure you want to
    Your message goes here
No Downloads

Views

Total Views
858
On SlideShare
0
From Embeds
0
Number of Embeds
6

Actions

Shares
Downloads
27
Comments
1
Likes
3

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. 4 hours RoR training Workshop Umair Amjad Senior Software Engineer http://about.me/umairamjad Boutique product development company Ahmad Awais Software Engineer http://www.linkedin.com/in/ahmad91 It is amazing what you can accomplish when you have a client-centric team to deliver outstanding products.
  • 2. RoR Workshop Agenda: • • • • • • • • • • • • • • • Presenters Ruby Language Setting up Environment Overview of RoR MVC – ActiveRecord, ActionController, ActionView Routing Assets/Bundler REST Architecture DB Migrations Console ActiveRecord Associations Validation/Validation Helpers Forms/ActionView helpers Caching Debugging Umair Amjad | Ahmad Awais
  • 3. <What will you be talking about. This is your topic> UMAIR AMJAD AHMAD AWAIS Ahmad Awais | SE Umair Amjad | Ahmad Awais
  • 4. Ruby Umair Amjad | Ahmad Awais
  • 5. <What will you be talking about. This is your topic> Umair Amjad | Ahmad Awais
  • 6. Umair Amjad | Ahmad Awais
  • 7. Umair Amjad | Ahmad Awais
  • 8. Umair Amjad | Ahmad Awais
  • 9. Umair Amjad | Ahmad Awais
  • 10. Umair Amjad | Ahmad Awais
  • 11. Umair Amjad | Ahmad Awais
  • 12. Umair Amjad | Ahmad Awais
  • 13. Umair Amjad | Ahmad Awais
  • 14. Umair Amjad | Ahmad Awais
  • 15. https://sites.google.com/a/confiz.com/traning-agenda/day-5 Primary: http://www.tutorialspoint.com/ruby/index.htm The Little Book Of Ruby References: http://www.codecademy.com/tracks/ruby http://www.rubyist.net/~slagell/ruby/getstarted.html http://rubymonk.com/learning/books/1-ruby-primer Try Ruby online: http://www.compileonline.com/execute_ruby_online.php Umair Amjad | Ahmad Awais
  • 16. Setting up Environment (RVM) Umair Amjad | Ahmad Awais
  • 17. http://setuprubyonrails.blogspot.com/2012/04/ruby-on-rails-environment-setup-on.html rvm install [ruby_version] rvm install 1.9.2 rvm use [ruby_version] rvm use 1.9.2 rvm gemset create [gemset_name] rvm gemset create rails3.1.3 rvm use [ruby_version]@[gemset_name] rvm use 1.9.2@rails3.1.3 Umair Amjad | Ahmad Awais
  • 18. Overview of RoR / MVC Umair Amjad | Ahmad Awais
  • 19. Umair Amjad | Ahmad Awais
  • 20. Umair Amjad | Ahmad Awais
  • 21. Umair Amjad | Ahmad Awais
  • 22. Umair Amjad | Ahmad Awais
  • 23. Umair Amjad | Ahmad Awais
  • 24. Umair Amjad | Ahmad Awais
  • 25. REST Architecture Umair Amjad | Ahmad Awais
  • 26. Umair Amjad | Ahmad Awais
  • 27. Umair Amjad | Ahmad Awais
  • 28. Umair Amjad | Ahmad Awais
  • 29. Assets / Minification Umair Amjad | Ahmad Awais
  • 30. Umair Amjad | Ahmad Awais
  • 31. Bundler not Butlers :p Umair Amjad | Ahmad Awais
  • 32. Umair Amjad | Ahmad Awais
  • 33. Code Generation Umair Amjad | Ahmad Awais
  • 34. Umair Amjad | Ahmad Awais
  • 35. Umair Amjad | Ahmad Awais
  • 36. Umair Amjad | Ahmad Awais
  • 37. Rails Rake, Route, Controller, Model, View Umair Amjad | Ahmad Awais
  • 38. Rake Umair Amjad | Ahmad Awais
  • 39. Rake is Ruby make, a make-like language written in Ruby. Rails uses Rake extensively, especially for the innumerable little administrative tasks necessary when developing databasebacked web applications. Rake tasks are loaded from the file Rakefile Rails rake tasks live under /lib/tasks You can put your own tasks under lib/tasks bundle exec rake -T bundle exec rake -T db #See a list of database tasks Umair Amjad | Ahmad Awais
  • 40. db: Database The most common tasks of the db: Rake namespace are migrate and create, and it will pay off to try out all of the migration rake tasks (up, down, redo, reset). rake db:version is useful when troubleshooting, telling you the current version of the database. rails: Rails-specific tasks After upgrading Rails, it is useful to run rails:update, which will update your config and scripts directories, and upgrade your Railsspecific javascript rake stats #gives summary statistics about your code rake routes #lists all your defined routes rake secret Umair Amjad | Ahmad Awais
  • 41. Routes Umair Amjad | Ahmad Awais
  • 42. Umair Amjad | Ahmad Awais
  • 43. Umair Amjad | Ahmad Awais
  • 44. Umair Amjad | Ahmad Awais
  • 45. Umair Amjad | Ahmad Awais
  • 46. Umair Amjad | Ahmad Awais
  • 47. Controllers Umair Amjad | Ahmad Awais
  • 48. Umair Amjad | Ahmad Awais
  • 49. Umair Amjad | Ahmad Awais
  • 50. Umair Amjad | Ahmad Awais
  • 51. Umair Amjad | Ahmad Awais
  • 52. Umair Amjad | Ahmad Awais
  • 53. Umair Amjad | Ahmad Awais
  • 54. Umair Amjad | Ahmad Awais
  • 55. Umair Amjad | Ahmad Awais
  • 56. Umair Amjad | Ahmad Awais
  • 57. Model Umair Amjad | Ahmad Awais
  • 58. Umair Amjad | Ahmad Awais
  • 59. Umair Amjad | Ahmad Awais
  • 60. Umair Amjad | Ahmad Awais
  • 61. Umair Amjad | Ahmad Awais
  • 62. Umair Amjad | Ahmad Awais
  • 63. Umair Amjad | Ahmad Awais
  • 64. Umair Amjad | Ahmad Awais
  • 65. Umair Amjad | Ahmad Awais
  • 66. Umair Amjad | Ahmad Awais
  • 67. Umair Amjad | Ahmad Awais
  • 68. Umair Amjad | Ahmad Awais
  • 69. Umair Amjad | Ahmad Awais
  • 70. Umair Amjad | Ahmad Awais
  • 71. Umair Amjad | Ahmad Awais
  • 72. Umair Amjad | Ahmad Awais
  • 73. Umair Amjad | Ahmad Awais
  • 74. Umair Amjad | Ahmad Awais
  • 75. Umair Amjad | Ahmad Awais
  • 76. Umair Amjad | Ahmad Awais
  • 77. Umair Amjad | Ahmad Awais
  • 78. Views Umair Amjad | Ahmad Awais
  • 79. Umair Amjad | Ahmad Awais
  • 80. Umair Amjad | Ahmad Awais
  • 81. Umair Amjad | Ahmad Awais
  • 82. Umair Amjad | Ahmad Awais
  • 83. Debugging / Error Handling Umair Amjad | Ahmad Awais
  • 84. Umair Amjad | Ahmad Awais
  • 85. Umair Amjad | Ahmad Awais
  • 86. gem install debugger class PeopleController < ApplicationController def new debugger @person = Person.new end end $ rails server --debugger => Booting WEBrick => Rails 4.0.0 application starting on http://0.0.0.0:3000 => Debugger enabled Umair Amjad | Ahmad Awais
  • 87. Caching Umair Amjad | Ahmad Awais
  • 88. Umair Amjad | Ahmad Awais
  • 89. Umair Amjad | Ahmad Awais
  • 90. Umair Amjad | Ahmad Awais
  • 91. Console Umair Amjad | Ahmad Awais
  • 92. rails console The console command lets you interact with your Rails application from the command line. On the underside, rails console uses IRB, so if you've ever used it, you'll be right at home. This is useful for testing out quick ideas with code and changing data server-side without touching the website. rails dbconsole rails dbconsole figures out which database you're using and drops you into whichever command line interface you would use with it (and figures out the command line parameters to give to it, too!). It supports MySQL, PostgreSQL, SQLite and SQLite3. Umair Amjad | Ahmad Awais
  • 93. Questions ? Umair Amjad | Ahmad Awais