Ride on the Fast Track of Web with Ruby on Rails- Part 1
-
Upload
fuad-omar -
Category
Technology
-
view
2.991 -
download
0
description
Transcript of Ride on the Fast Track of Web with Ruby on Rails- Part 1
![Page 1: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/1.jpg)
Ruby on Rails
Ride on the fast track of web
![Page 2: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/2.jpg)
![Page 3: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/3.jpg)
![Page 4: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/4.jpg)
![Page 5: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/5.jpg)
“Accumulated knowledge of the
world to your fingertip”
![Page 6: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/6.jpg)
![Page 7: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/7.jpg)
![Page 8: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/8.jpg)
![Page 9: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/9.jpg)
![Page 10: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/10.jpg)
![Page 11: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/11.jpg)
![Page 12: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/12.jpg)
![Page 13: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/13.jpg)
![Page 14: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/14.jpg)
![Page 15: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/15.jpg)
![Page 16: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/16.jpg)
![Page 17: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/17.jpg)
“We are the masters
They are the slaves”
![Page 18: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/18.jpg)
![Page 19: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/19.jpg)
![Page 20: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/20.jpg)
![Page 21: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/21.jpg)
2.days.ago =>Thu, 23 Feb 2012 14:11:45 EST -05:00
‘fuad bin omar’.reverse =>ramo nib dauf
‘fuad bin omar’.capitalize =>Fuad bin omar
‘fuad bin omar’.length =>13
![Page 22: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/22.jpg)
![Page 23: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/23.jpg)
![Page 24: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/24.jpg)
![Page 25: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/25.jpg)
![Page 26: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/26.jpg)
![Page 27: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/27.jpg)
![Page 28: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/28.jpg)
![Page 29: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/29.jpg)
![Page 30: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/30.jpg)
![Page 31: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/31.jpg)
![Page 32: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/32.jpg)
![Page 33: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/33.jpg)
![Page 34: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/34.jpg)
+
![Page 35: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/35.jpg)
![Page 36: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/36.jpg)
Convention
Configuration
Over
![Page 37: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/37.jpg)
![Page 38: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/38.jpg)
![Page 39: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/39.jpg)
One Class Per Table
Class User < ActiveRecord::Base
end
![Page 40: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/40.jpg)
![Page 41: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/41.jpg)
Validations
Class User < ActiveRecord::Base
validates_presence_of :login,:name
validates_uniqueness_of :login
end
![Page 42: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/42.jpg)
![Page 43: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/43.jpg)
class User < ActiveRecord::Base
has_many :posts
end
class Post< ActiveRecord::Base
belongs_to :user
end
![Page 44: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/44.jpg)
![Page 45: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/45.jpg)
User.create!(:login => ‘fuad’,
:name => ‘Fuad Omar’)
user = User.new(:login =>
‘fuad’, :name => ‘Fuad Omar’)
user.save!
user = User.new
user.login = ‘fuad’
user.name = ‘Fuad Omar’
user.save!
![Page 46: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/46.jpg)
![Page 47: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/47.jpg)
user = User.first
user = User.find(12)
user = User.find_by_name(‘Fuad’)
posts = user.posts
![Page 48: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/48.jpg)
user = User.find(12)
posts =
user.posts.where(‘created_at >’,
Date.today – 7.days.ago)
posts = posts.order(‘title‘)
![Page 49: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/49.jpg)
user = User.find(1)
user.name = ‘Fuad Bin Omar’
User.save
![Page 50: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/50.jpg)
![Page 51: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/51.jpg)
![Page 52: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/52.jpg)
![Page 53: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/53.jpg)
![Page 54: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/54.jpg)
2,35,000
![Page 55: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/55.jpg)
![Page 56: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/56.jpg)
![Page 57: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/57.jpg)
![Page 58: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/58.jpg)
![Page 59: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/59.jpg)
![Page 60: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/60.jpg)
Fuad Omar Co-Founder, Nascenia IT
www.nascenia.com
www.facebook.com/nascenia
www.linkedin.com/in/fuadomar
@fuadcse
![Page 61: Ride on the Fast Track of Web with Ruby on Rails- Part 1](https://reader033.fdocuments.in/reader033/viewer/2022060107/554b7385b4c905030a8b5511/html5/thumbnails/61.jpg)
http://www.softexpo.com.bd/technical_details.php?id=9
To see 2nd part of this presentation visit:
http://www.slideshare.net/ashrafuzzaman/riding-on-rails-part-2
Presented At