SlideShare a Scribd company logo
Ruby on Rails Workshop NYU ITP 2010 Presented by Daniel Tsadok
What is Ruby on Rails?
Why Ruby on Rails? Why not PHP?
Organization
Rails 2 vs. Rails 3
Ruby
Run  irb  in the terminal OR Create a text file (.rb) and run:  ruby filename.rb
puts(“Hello, World!”)
#puts(“Hello, World!”)
s = “Hello, World!” puts(s)
def say_hello(name) puts(“Hello, #{name}!”) end say_hello(“Daniel”)
#look Ma, no parentheses! def say_hello name puts “Hello, #{name}!” end say_hello “Daniel”
Everything is an Object
1 + 1
1.class 1.methods 1.+(1)
class Fixnum alias :+ :plus end one = 1 one.plus(1)
Loop It Up
ar = [1, 2, 3] ar.length for i in ar puts i end
3.times do puts “Hip, Hip, Hooray!” end
ar = [1, 2, 3] ar.length ar.each do |i| puts i end
ar = %w(Red Green Blue) puts ar.inspect ar.each {|w| puts w} puts ar[1]
h = { “ r” => “Red”, “ g” => “Green”, “ b” => “Blue” } h.keys h.each do |k, v| puts “#{k}: #{v}” end
Rails
Rails Principles
Convention Over Configuration
Don’t Repeat Yourself
Model View Controller
rails hello_rails
Controller
script/generate script/generate controller script/generate controller hello
app/controllers/hello_controller.rb def index render :text => “Hello!” end
Routes
config/routes.rb map.connect ‘:controller/:action/:id`
map.connect ‘/hello’, :controller => ‘hello’, :action => ‘index’
map. hello  ‘/hello’, :controller => ‘hello’, :action => ‘index’
script/server http://localhost:3000/hello
map.connect ‘/hello/ :name ’, :controller => ‘hello’, :action => ‘index’
def index render :text => “Hello, #{params[:name]}!” end
script/generate controller guess
map.connect ‘/guess/:name’, :controller => ‘guess’ --------------------------------- def index if params[:name] == “daniel” render :text => “You got it!” else render :text => “Not quite!” end end
map.connect ‘/guess/daniel’, :controller => ‘guess’, :action => ‘right’ map.connect ‘/guess/:name’, :controller => ‘guess’, :action => ‘wrong’
app/controllers/guess_controller.rb def right render :text => “You got it!” end def wrong render :text => “Not quite!” end
Filters
app/controllers/hello_controller.rb before_filter :check_id def index end protected def check_id if params[:id] != “Daniel” redirect_to “http://www.nyu.edu” end end
View
app/views/guess/right.html.erb --- <h1>Right!</h1> app/views/guess/wrong.html.erb --- <h1>It’s not <%= params[:name] %></h1>
Layouts
app/views/layouts/main.html.erb
<html> <head> <title>Title Goes Here</title> </head> <body> <div id=“header”>…</div> <div id=“main”> <%= yield %> </div> <div id=“footer”>…</div> </body> </html>
app/controllers/guess_controller.rb class GuestController < Applica... layout “main” def right end def wrong end end
Model
ORM
mysql> select * from itp_students; +--------+--------+----------------+ | name  | email  | advisor  | +--------+--------+----------------+ | Daniel | dmt321 | Shawn  | | Bob  | brb555 | DanO  | +--------+--------+----------------+
student = ItpStudent.new student.name = “Daniel” student.email = “...” student.advisor = “Shawn” student.save
INSERT INTO itp_students (name, email, advisor) VALUES (‘Daniel’, ‘...’, ‘Shawn’);
student = ItpStudent.find_by_name “Daniel” student.name = “Daniel T” student.save
UPDATE itp_students SET name = ‘Daniel T’ WHERE name = ‘Daniel’;
config/database.yml
script/generate model ItpStudent name:string email:string advisor:string
db/migrate/..._create_itp_students.rb
script/generate migration add_gpa_to_itp_student gpa:integer
rake db:migrate
$ script/console Loading development environment (Rails 2.3.5) >>  ItpStudent => ItpStudent(id: integer, name: string, email: string, advisor: string, created _at: datetime, updated_at: datetime, gpa: integer)
>> student = ItpStudent.new >> student.name = “Daniel” >> student.save!
Validations
class ItpStudent < ActiveRecord::Base validates_presence_of :name end
>> student = ItpStudent.new >> student.valid? => false >> student.save => false >> student.save! ActiveRecord::RecordInvalid: Validation failed: Name can't be blank
Scopes
class ItpStudent < ActiveRecord::Base named_scope :passing => { :conditions => “gpa > 2” } named_scope :advised_by => {|x| :conditions => {:advisor => x} } end
>> ItpStudent.passing >> ItpStudent.advised_by ‘Shawn’ >> ItpStudent.advised_by(‘Shawn’).passing
Relations (has_many, belongs_to)
class ItpStudent < ActiveRecord::Base has_many :classes belongs_to :itp_class end
>> student = ItpStudent.first >> student.classes.first
MOAR !!!
If you got this far… ,[object Object],[object Object],[object Object],[object Object]
Further Reading ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Thanks!

More Related Content

What's hot

YAPC::Asia 2010 Twitter解析サービス
YAPC::Asia 2010 Twitter解析サービスYAPC::Asia 2010 Twitter解析サービス
YAPC::Asia 2010 Twitter解析サービス
Yusuke Wada
 
Webrtc mojo
Webrtc mojoWebrtc mojo
Webrtc mojo
bpmedley
 
(Ab)Using the MetaCPAN API for Fun and Profit
(Ab)Using the MetaCPAN API for Fun and Profit(Ab)Using the MetaCPAN API for Fun and Profit
(Ab)Using the MetaCPAN API for Fun and Profit
Olaf Alders
 
Building an e:commerce site with PHP
Building an e:commerce site with PHPBuilding an e:commerce site with PHP
Building an e:commerce site with PHP
webhostingguy
 
Keeping it small: Getting to know the Slim micro framework
Keeping it small: Getting to know the Slim micro frameworkKeeping it small: Getting to know the Slim micro framework
Keeping it small: Getting to know the Slim micro framework
Jeremy Kendall
 
PerlDancer for Perlers (FOSDEM 2011)
PerlDancer for Perlers (FOSDEM 2011)PerlDancer for Perlers (FOSDEM 2011)
PerlDancer for Perlers (FOSDEM 2011)
xSawyer
 
Extracting ruby gem
Extracting ruby gemExtracting ruby gem
Extracting ruby gem
Yura Tolstik
 
Blog Hacks 2011
Blog Hacks 2011Blog Hacks 2011
Blog Hacks 2011
Yusuke Wada
 
Programming For Designers V3
Programming For Designers V3Programming For Designers V3
Programming For Designers V3
sqoo
 
Mojo as a_client
Mojo as a_clientMojo as a_client
Mojo as a_client
Marcus Ramberg
 
Path::Tiny
Path::TinyPath::Tiny
Path::Tiny
waniji
 
Absolute Beginners Guide to Puppet Through Types - PuppetConf 2014
Absolute Beginners Guide to Puppet Through Types - PuppetConf 2014Absolute Beginners Guide to Puppet Through Types - PuppetConf 2014
Absolute Beginners Guide to Puppet Through Types - PuppetConf 2014
Puppet
 
RESTful web services
RESTful web servicesRESTful web services
RESTful web services
Tudor Constantin
 
Clean Code Tips (Day 1 )
Clean Code Tips (Day 1 )Clean Code Tips (Day 1 )
Clean Code Tips (Day 1 )
Ahmed Abd El Ftah
 
Dancer's Ecosystem
Dancer's EcosystemDancer's Ecosystem
Dancer's Ecosystem
Alexis Sukrieh
 
My First Ruby
My First RubyMy First Ruby
My First Ruby
Murray Steele
 
Perl web frameworks
Perl web frameworksPerl web frameworks
Perl web frameworks
diego_k
 
Inside Bokete: Web Application with Mojolicious and others
Inside Bokete:  Web Application with Mojolicious and othersInside Bokete:  Web Application with Mojolicious and others
Inside Bokete: Web Application with Mojolicious and others
Yusuke Wada
 
An introduction to Rex - FLOSS UK DevOps York 2015
An introduction to Rex - FLOSS UK DevOps York 2015An introduction to Rex - FLOSS UK DevOps York 2015
An introduction to Rex - FLOSS UK DevOps York 2015
Andy Beverley
 
Learning Perl 6
Learning Perl 6 Learning Perl 6
Learning Perl 6
brian d foy
 

What's hot (20)

YAPC::Asia 2010 Twitter解析サービス
YAPC::Asia 2010 Twitter解析サービスYAPC::Asia 2010 Twitter解析サービス
YAPC::Asia 2010 Twitter解析サービス
 
Webrtc mojo
Webrtc mojoWebrtc mojo
Webrtc mojo
 
(Ab)Using the MetaCPAN API for Fun and Profit
(Ab)Using the MetaCPAN API for Fun and Profit(Ab)Using the MetaCPAN API for Fun and Profit
(Ab)Using the MetaCPAN API for Fun and Profit
 
Building an e:commerce site with PHP
Building an e:commerce site with PHPBuilding an e:commerce site with PHP
Building an e:commerce site with PHP
 
Keeping it small: Getting to know the Slim micro framework
Keeping it small: Getting to know the Slim micro frameworkKeeping it small: Getting to know the Slim micro framework
Keeping it small: Getting to know the Slim micro framework
 
PerlDancer for Perlers (FOSDEM 2011)
PerlDancer for Perlers (FOSDEM 2011)PerlDancer for Perlers (FOSDEM 2011)
PerlDancer for Perlers (FOSDEM 2011)
 
Extracting ruby gem
Extracting ruby gemExtracting ruby gem
Extracting ruby gem
 
Blog Hacks 2011
Blog Hacks 2011Blog Hacks 2011
Blog Hacks 2011
 
Programming For Designers V3
Programming For Designers V3Programming For Designers V3
Programming For Designers V3
 
Mojo as a_client
Mojo as a_clientMojo as a_client
Mojo as a_client
 
Path::Tiny
Path::TinyPath::Tiny
Path::Tiny
 
Absolute Beginners Guide to Puppet Through Types - PuppetConf 2014
Absolute Beginners Guide to Puppet Through Types - PuppetConf 2014Absolute Beginners Guide to Puppet Through Types - PuppetConf 2014
Absolute Beginners Guide to Puppet Through Types - PuppetConf 2014
 
RESTful web services
RESTful web servicesRESTful web services
RESTful web services
 
Clean Code Tips (Day 1 )
Clean Code Tips (Day 1 )Clean Code Tips (Day 1 )
Clean Code Tips (Day 1 )
 
Dancer's Ecosystem
Dancer's EcosystemDancer's Ecosystem
Dancer's Ecosystem
 
My First Ruby
My First RubyMy First Ruby
My First Ruby
 
Perl web frameworks
Perl web frameworksPerl web frameworks
Perl web frameworks
 
Inside Bokete: Web Application with Mojolicious and others
Inside Bokete:  Web Application with Mojolicious and othersInside Bokete:  Web Application with Mojolicious and others
Inside Bokete: Web Application with Mojolicious and others
 
An introduction to Rex - FLOSS UK DevOps York 2015
An introduction to Rex - FLOSS UK DevOps York 2015An introduction to Rex - FLOSS UK DevOps York 2015
An introduction to Rex - FLOSS UK DevOps York 2015
 
Learning Perl 6
Learning Perl 6 Learning Perl 6
Learning Perl 6
 

Viewers also liked

La musica
La musicaLa musica
La musica
Juan Manco
 
Making a Light Reflector ~ Teacher Guide, Organic Gardening
Making a Light Reflector ~ Teacher Guide, Organic GardeningMaking a Light Reflector ~ Teacher Guide, Organic Gardening
Making a Light Reflector ~ Teacher Guide, Organic Gardening
School Vegetable Gardening - Victory Gardens
 
4 ltr powerpoint2010_ch20_pr1a_michaelagaffney_2
4 ltr powerpoint2010_ch20_pr1a_michaelagaffney_24 ltr powerpoint2010_ch20_pr1a_michaelagaffney_2
4 ltr powerpoint2010_ch20_pr1a_michaelagaffney_2
Michaela Gaffney
 
Breast cancer awareness
Breast cancer awarenessBreast cancer awareness
Breast cancer awareness
Deepak Singh
 
香港六合彩
香港六合彩香港六合彩
香港六合彩
yyou
 
Futbol es mi pasion
Futbol es mi pasionFutbol es mi pasion
Futbol es mi pasion
Julian Ochoa Barco
 
^^ Tipos de energía^^
 ^^ Tipos de energía^^ ^^ Tipos de energía^^
^^ Tipos de energía^^
Locoman145
 
Portfolio1
Portfolio1Portfolio1
Portfolio1
guest5e87f9
 
Caso PTI n-plate. Dr García Erce
Caso PTI n-plate. Dr García ErceCaso PTI n-plate. Dr García Erce
Caso PTI n-plate. Dr García Erce
José Antonio García Erce
 
MAPA CONCEPTUAL II GUERRA MUNDIAL
MAPA CONCEPTUAL II GUERRA MUNDIALMAPA CONCEPTUAL II GUERRA MUNDIAL
MAPA CONCEPTUAL II GUERRA MUNDIAL
luchoportuano25
 
Chapter 3
Chapter 3Chapter 3
Chapter 3
Robioul Hasan
 
Breast Cancer Awareness Month - ROJoson's Lecture - 16oct22
Breast Cancer Awareness Month - ROJoson's Lecture - 16oct22Breast Cancer Awareness Month - ROJoson's Lecture - 16oct22
Breast Cancer Awareness Month - ROJoson's Lecture - 16oct22
Reynaldo Joson
 
Chapter 14
Chapter 14 Chapter 14
Chapter 14
Robioul Hasan
 
How to Do Physical Examination of the Breasts
How to Do Physical Examination of the BreastsHow to Do Physical Examination of the Breasts
How to Do Physical Examination of the Breasts
Reynaldo Joson
 
Capitulo 23 Casos de Embarques
Capitulo 23 Casos de EmbarquesCapitulo 23 Casos de Embarques
Capitulo 23 Casos de Embarques
profrcconcepcion
 
Capitulo 22 Casos de Radiacion
Capitulo 22 Casos de RadiacionCapitulo 22 Casos de Radiacion
Capitulo 22 Casos de Radiacion
profrcconcepcion
 
Capitulo 21 Casos Descompuestos
Capitulo 21 Casos DescompuestosCapitulo 21 Casos Descompuestos
Capitulo 21 Casos Descompuestos
profrcconcepcion
 
Capitulo I Los Principios y Practicas del Embalsamamiento
Capitulo I Los Principios y Practicas del EmbalsamamientoCapitulo I Los Principios y Practicas del Embalsamamiento
Capitulo I Los Principios y Practicas del Embalsamamiento
profrcconcepcion
 

Viewers also liked (19)

Abcdef
AbcdefAbcdef
Abcdef
 
La musica
La musicaLa musica
La musica
 
Making a Light Reflector ~ Teacher Guide, Organic Gardening
Making a Light Reflector ~ Teacher Guide, Organic GardeningMaking a Light Reflector ~ Teacher Guide, Organic Gardening
Making a Light Reflector ~ Teacher Guide, Organic Gardening
 
4 ltr powerpoint2010_ch20_pr1a_michaelagaffney_2
4 ltr powerpoint2010_ch20_pr1a_michaelagaffney_24 ltr powerpoint2010_ch20_pr1a_michaelagaffney_2
4 ltr powerpoint2010_ch20_pr1a_michaelagaffney_2
 
Breast cancer awareness
Breast cancer awarenessBreast cancer awareness
Breast cancer awareness
 
香港六合彩
香港六合彩香港六合彩
香港六合彩
 
Futbol es mi pasion
Futbol es mi pasionFutbol es mi pasion
Futbol es mi pasion
 
^^ Tipos de energía^^
 ^^ Tipos de energía^^ ^^ Tipos de energía^^
^^ Tipos de energía^^
 
Portfolio1
Portfolio1Portfolio1
Portfolio1
 
Caso PTI n-plate. Dr García Erce
Caso PTI n-plate. Dr García ErceCaso PTI n-plate. Dr García Erce
Caso PTI n-plate. Dr García Erce
 
MAPA CONCEPTUAL II GUERRA MUNDIAL
MAPA CONCEPTUAL II GUERRA MUNDIALMAPA CONCEPTUAL II GUERRA MUNDIAL
MAPA CONCEPTUAL II GUERRA MUNDIAL
 
Chapter 3
Chapter 3Chapter 3
Chapter 3
 
Breast Cancer Awareness Month - ROJoson's Lecture - 16oct22
Breast Cancer Awareness Month - ROJoson's Lecture - 16oct22Breast Cancer Awareness Month - ROJoson's Lecture - 16oct22
Breast Cancer Awareness Month - ROJoson's Lecture - 16oct22
 
Chapter 14
Chapter 14 Chapter 14
Chapter 14
 
How to Do Physical Examination of the Breasts
How to Do Physical Examination of the BreastsHow to Do Physical Examination of the Breasts
How to Do Physical Examination of the Breasts
 
Capitulo 23 Casos de Embarques
Capitulo 23 Casos de EmbarquesCapitulo 23 Casos de Embarques
Capitulo 23 Casos de Embarques
 
Capitulo 22 Casos de Radiacion
Capitulo 22 Casos de RadiacionCapitulo 22 Casos de Radiacion
Capitulo 22 Casos de Radiacion
 
Capitulo 21 Casos Descompuestos
Capitulo 21 Casos DescompuestosCapitulo 21 Casos Descompuestos
Capitulo 21 Casos Descompuestos
 
Capitulo I Los Principios y Practicas del Embalsamamiento
Capitulo I Los Principios y Practicas del EmbalsamamientoCapitulo I Los Principios y Practicas del Embalsamamiento
Capitulo I Los Principios y Practicas del Embalsamamiento
 

Similar to Rails 2010 Workshop

CoffeeScript - A Rubyist's Love Affair
CoffeeScript - A Rubyist's Love AffairCoffeeScript - A Rubyist's Love Affair
CoffeeScript - A Rubyist's Love Affair
Mark
 
Ruby on Rails
Ruby on RailsRuby on Rails
Ruby on Rails
bryanbibat
 
Desarrollando aplicaciones web en minutos
Desarrollando aplicaciones web en minutosDesarrollando aplicaciones web en minutos
Desarrollando aplicaciones web en minutos
Edgar Suarez
 
Ruby gems
Ruby gemsRuby gems
Ruby gems
Papp Laszlo
 
Single Page Web Applications with CoffeeScript, Backbone and Jasmine
Single Page Web Applications with CoffeeScript, Backbone and JasmineSingle Page Web Applications with CoffeeScript, Backbone and Jasmine
Single Page Web Applications with CoffeeScript, Backbone and Jasmine
Paulo Ragonha
 
Good Evils In Perl (Yapc Asia)
Good Evils In Perl (Yapc Asia)Good Evils In Perl (Yapc Asia)
Good Evils In Perl (Yapc Asia)
Kang-min Liu
 
Rails workshop for Java people (September 2015)
Rails workshop for Java people (September 2015)Rails workshop for Java people (September 2015)
Rails workshop for Java people (September 2015)
Andre Foeken
 
Ruby/Rails
Ruby/RailsRuby/Rails
Ruby/Rails
rstankov
 
Ruby and Rails by Example (GeekCamp edition)
Ruby and Rails by Example (GeekCamp edition)Ruby and Rails by Example (GeekCamp edition)
Ruby and Rails by Example (GeekCamp edition)
bryanbibat
 
Lecture19-20
Lecture19-20Lecture19-20
Lecture19-20
tutorialsruby
 
Lecture19-20
Lecture19-20Lecture19-20
Lecture19-20
tutorialsruby
 
Introduction à CoffeeScript pour ParisRB
Introduction à CoffeeScript pour ParisRB Introduction à CoffeeScript pour ParisRB
Introduction à CoffeeScript pour ParisRB
jhchabran
 
Real life-coffeescript
Real life-coffeescriptReal life-coffeescript
Real life-coffeescript
David Furber
 
"Javascript" por Tiago Rodrigues
"Javascript" por Tiago Rodrigues"Javascript" por Tiago Rodrigues
Postobjektové programovanie v Ruby
Postobjektové programovanie v RubyPostobjektové programovanie v Ruby
Postobjektové programovanie v Ruby
Jano Suchal
 
Ruby
RubyRuby
Attributes Unwrapped: Lessons under the surface of active record
Attributes Unwrapped: Lessons under the surface of active recordAttributes Unwrapped: Lessons under the surface of active record
Attributes Unwrapped: Lessons under the surface of active record
.toster
 
비윈도우즈 환경의 기술 서적 번역 도구 경험 공유
비윈도우즈 환경의 기술 서적 번역 도구 경험 공유비윈도우즈 환경의 기술 서적 번역 도구 경험 공유
비윈도우즈 환경의 기술 서적 번역 도구 경험 공유
Younggun Kim
 
Reasons To Love Ruby
Reasons To Love RubyReasons To Love Ruby
Reasons To Love Ruby
Ben Scheirman
 
A tour on ruby and friends
A tour on ruby and friendsA tour on ruby and friends
A tour on ruby and friends
旻琦 潘
 

Similar to Rails 2010 Workshop (20)

CoffeeScript - A Rubyist's Love Affair
CoffeeScript - A Rubyist's Love AffairCoffeeScript - A Rubyist's Love Affair
CoffeeScript - A Rubyist's Love Affair
 
Ruby on Rails
Ruby on RailsRuby on Rails
Ruby on Rails
 
Desarrollando aplicaciones web en minutos
Desarrollando aplicaciones web en minutosDesarrollando aplicaciones web en minutos
Desarrollando aplicaciones web en minutos
 
Ruby gems
Ruby gemsRuby gems
Ruby gems
 
Single Page Web Applications with CoffeeScript, Backbone and Jasmine
Single Page Web Applications with CoffeeScript, Backbone and JasmineSingle Page Web Applications with CoffeeScript, Backbone and Jasmine
Single Page Web Applications with CoffeeScript, Backbone and Jasmine
 
Good Evils In Perl (Yapc Asia)
Good Evils In Perl (Yapc Asia)Good Evils In Perl (Yapc Asia)
Good Evils In Perl (Yapc Asia)
 
Rails workshop for Java people (September 2015)
Rails workshop for Java people (September 2015)Rails workshop for Java people (September 2015)
Rails workshop for Java people (September 2015)
 
Ruby/Rails
Ruby/RailsRuby/Rails
Ruby/Rails
 
Ruby and Rails by Example (GeekCamp edition)
Ruby and Rails by Example (GeekCamp edition)Ruby and Rails by Example (GeekCamp edition)
Ruby and Rails by Example (GeekCamp edition)
 
Lecture19-20
Lecture19-20Lecture19-20
Lecture19-20
 
Lecture19-20
Lecture19-20Lecture19-20
Lecture19-20
 
Introduction à CoffeeScript pour ParisRB
Introduction à CoffeeScript pour ParisRB Introduction à CoffeeScript pour ParisRB
Introduction à CoffeeScript pour ParisRB
 
Real life-coffeescript
Real life-coffeescriptReal life-coffeescript
Real life-coffeescript
 
"Javascript" por Tiago Rodrigues
"Javascript" por Tiago Rodrigues"Javascript" por Tiago Rodrigues
"Javascript" por Tiago Rodrigues
 
Postobjektové programovanie v Ruby
Postobjektové programovanie v RubyPostobjektové programovanie v Ruby
Postobjektové programovanie v Ruby
 
Ruby
RubyRuby
Ruby
 
Attributes Unwrapped: Lessons under the surface of active record
Attributes Unwrapped: Lessons under the surface of active recordAttributes Unwrapped: Lessons under the surface of active record
Attributes Unwrapped: Lessons under the surface of active record
 
비윈도우즈 환경의 기술 서적 번역 도구 경험 공유
비윈도우즈 환경의 기술 서적 번역 도구 경험 공유비윈도우즈 환경의 기술 서적 번역 도구 경험 공유
비윈도우즈 환경의 기술 서적 번역 도구 경험 공유
 
Reasons To Love Ruby
Reasons To Love RubyReasons To Love Ruby
Reasons To Love Ruby
 
A tour on ruby and friends
A tour on ruby and friendsA tour on ruby and friends
A tour on ruby and friends
 

Recently uploaded

Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
saastr
 
Recommendation System using RAG Architecture
Recommendation System using RAG ArchitectureRecommendation System using RAG Architecture
Recommendation System using RAG Architecture
fredae14
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
Postman
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
Tatiana Kojar
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Jeffrey Haguewood
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Tatiana Kojar
 
Operating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptxOperating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptx
Pravash Chandra Das
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Jeffrey Haguewood
 

Recently uploaded (20)

Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
 
Recommendation System using RAG Architecture
Recommendation System using RAG ArchitectureRecommendation System using RAG Architecture
Recommendation System using RAG Architecture
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
 
Operating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptxOperating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptx
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
 

Rails 2010 Workshop

Editor's Notes

  1. Ruby on Rails is a web development framework that makes building complex web applications much easier. Ruby is the language in which Rails is built.
  2. http://itp.nyu.edu/~dmt321/bad-php.txt http://itp.nyu.edu/~dmt321/better-php.txt
  3. Rails 3 is on the verge of being released – it’s already out in beta. Some of the syntax, especially in routing, will be changed in Rails 3. But the fundamental concepts are the same.
  4. Comments
  5. table names, primary key, location of files
  6. EXAMPLES
  7. You can created Named Routes as well – this creates the hello_url and hello_path helpers.
  8. Adding parameter :name
  9. More sane way to do it  Also notice that :action =&gt; “index” is optional
  10. Convention over configuration – Rails knows where to look for views.
  11. Convention over configuration – Rails knows where to look for layouts.
  12. Removed render :text code
  13. ORM is Object-Relational Mapping. It converts a row in a database table to an object.
  14. This is a lie. In fact Rails would not build a query like this.
  15. There are three different environments (more are possible). We will work primarily with the “development” environment.
  16. Notice the fields that were not in the migration file id - more convention over configuration
  17. Chained scopes
  18. Convention over configuration – looks for itp_student.advisor_id and classes.itp_student_id