SlideShare uma empresa Scribd logo
1 de 214
Baixar para ler offline
class User < ActiveRecord::Base
end
class User < ActiveRecord::Base
    has_many :books
end
class User < ActiveRecord::Base
    set_table_name 'user'
    set_primary_key 'pkey'
end
ITPro
http://localhost:3000/
DB




 DB




DB
DB
app/models/todo.rb



AR::Base
             O/R
Rails
Rails
View
 Controller
Model
      Rails
    mongrel
View



    Controller


Model
View



    Controller


Model

                        URL
             params[]
View



    Controller

                          URL
Model

                        URL
             params[]
View



    Controller
   Model.find,model.save
                          URL
Model

                        URL
             params[]
View



    Controller
   Model.find,model.save
                          URL
Model

                        URL
             params[]
View



    Controller
   Model.find,model.save
                          URL
Model

                        URL
             params[]
Rails
Todo


paginate
Todo


   paginate

HTML
Todo   edit   id   1
:partial
_      .rhtml
@todo



        <textarea>
            @todo.description
URL




redirect
app/models/todo.rb




description
class
Linux
Linux
2007/09/29 PHP to Rails - Webキャリアさん主催 ”PHPプログラマの為のRuby on Rails入門”

Mais conteúdo relacionado

Mais procurados

Java Server Faces + Spring MVC Framework
Java Server Faces + Spring MVC FrameworkJava Server Faces + Spring MVC Framework
Java Server Faces + Spring MVC Framework
Guo Albert
 
multiple views and routing
multiple views and routingmultiple views and routing
multiple views and routing
Brajesh Yadav
 

Mais procurados (20)

Web Development with Ruby on Rails, MyGOSSCON 2007
Web Development with Ruby on Rails, MyGOSSCON 2007Web Development with Ruby on Rails, MyGOSSCON 2007
Web Development with Ruby on Rails, MyGOSSCON 2007
 
Angular Js Basics
Angular Js BasicsAngular Js Basics
Angular Js Basics
 
Active Admin: Create Your Admin Interface the Easy Way
Active Admin: Create Your Admin Interface the Easy WayActive Admin: Create Your Admin Interface the Easy Way
Active Admin: Create Your Admin Interface the Easy Way
 
RoR 101: Session 5
RoR 101: Session 5RoR 101: Session 5
RoR 101: Session 5
 
Implicit objects advance Java
Implicit objects advance JavaImplicit objects advance Java
Implicit objects advance Java
 
RoR 101: Session 3
RoR 101: Session 3RoR 101: Session 3
RoR 101: Session 3
 
Java Server Faces + Spring MVC Framework
Java Server Faces + Spring MVC FrameworkJava Server Faces + Spring MVC Framework
Java Server Faces + Spring MVC Framework
 
Active Admin
Active AdminActive Admin
Active Admin
 
Jsp(java server pages)
Jsp(java server pages)Jsp(java server pages)
Jsp(java server pages)
 
RoR 101: Session 2
RoR 101: Session 2RoR 101: Session 2
RoR 101: Session 2
 
Rails 2.3 and Rack - NHRuby Feb 2009
Rails 2.3 and Rack - NHRuby Feb 2009Rails 2.3 and Rack - NHRuby Feb 2009
Rails 2.3 and Rack - NHRuby Feb 2009
 
Implicit object.pptx
Implicit object.pptxImplicit object.pptx
Implicit object.pptx
 
Ember Reusable Components and Widgets
Ember Reusable Components and WidgetsEmber Reusable Components and Widgets
Ember Reusable Components and Widgets
 
Brief Introduction to Ember
Brief Introduction to EmberBrief Introduction to Ember
Brief Introduction to Ember
 
Mvc3 crash
Mvc3 crashMvc3 crash
Mvc3 crash
 
RoR 101: Session 6
RoR 101: Session 6RoR 101: Session 6
RoR 101: Session 6
 
multiple views and routing
multiple views and routingmultiple views and routing
multiple views and routing
 
Java Server Pages
Java Server PagesJava Server Pages
Java Server Pages
 
Java Server Pages(jsp)
Java Server Pages(jsp)Java Server Pages(jsp)
Java Server Pages(jsp)
 
INTRODUCTION TO JSP,JSP LIFE CYCLE, ANATOMY OF JSP PAGE AND JSP PROCESSING
INTRODUCTION TO JSP,JSP LIFE CYCLE, ANATOMY OF JSP PAGE  AND JSP PROCESSINGINTRODUCTION TO JSP,JSP LIFE CYCLE, ANATOMY OF JSP PAGE  AND JSP PROCESSING
INTRODUCTION TO JSP,JSP LIFE CYCLE, ANATOMY OF JSP PAGE AND JSP PROCESSING
 

Destaque

Gorira 2
Gorira 2Gorira 2
Gorira 2
yutau
 
Solucionador de problemas
Solucionador de problemasSolucionador de problemas
Solucionador de problemas
mirna_zoff
 
Gorira 3
Gorira 3Gorira 3
Gorira 3
yutau
 
2007/09/29 PHP to Ruby - Webキャリアさん主催 ”PHPプログラマの為のRuby on Rails入門”
2007/09/29 PHP to Ruby - Webキャリアさん主催 ”PHPプログラマの為のRuby on Rails入門”2007/09/29 PHP to Ruby - Webキャリアさん主催 ”PHPプログラマの為のRuby on Rails入門”
2007/09/29 PHP to Ruby - Webキャリアさん主催 ”PHPプログラマの為のRuby on Rails入門”
Yuichiro MASUI
 

Destaque (6)

Gorira 2
Gorira 2Gorira 2
Gorira 2
 
Solucionador de problemas
Solucionador de problemasSolucionador de problemas
Solucionador de problemas
 
Gorira 3
Gorira 3Gorira 3
Gorira 3
 
Confia En Mi
Confia En MiConfia En Mi
Confia En Mi
 
2007/09/29 PHP to Ruby - Webキャリアさん主催 ”PHPプログラマの為のRuby on Rails入門”
2007/09/29 PHP to Ruby - Webキャリアさん主催 ”PHPプログラマの為のRuby on Rails入門”2007/09/29 PHP to Ruby - Webキャリアさん主催 ”PHPプログラマの為のRuby on Rails入門”
2007/09/29 PHP to Ruby - Webキャリアさん主催 ”PHPプログラマの為のRuby on Rails入門”
 
AIR+Blaze+Ruby
AIR+Blaze+RubyAIR+Blaze+Ruby
AIR+Blaze+Ruby
 

Semelhante a 2007/09/29 PHP to Rails - Webキャリアさん主催 ”PHPプログラマの為のRuby on Rails入門”

Learning to code for startup mvp session 3
Learning to code for startup mvp session 3Learning to code for startup mvp session 3
Learning to code for startup mvp session 3
Henry S
 
Ruby On Rails Tutorial
Ruby On Rails TutorialRuby On Rails Tutorial
Ruby On Rails Tutorial
sunniboy
 
Pragmatic Patterns of Ruby on Rails - Ruby Kaigi2009
Pragmatic Patterns of Ruby on Rails - Ruby Kaigi2009Pragmatic Patterns of Ruby on Rails - Ruby Kaigi2009
Pragmatic Patterns of Ruby on Rails - Ruby Kaigi2009
Yasuko Ohba
 
Jasig rubyon rails
Jasig rubyon railsJasig rubyon rails
Jasig rubyon rails
_zaMmer_
 
Jasig rubyon rails
Jasig rubyon railsJasig rubyon rails
Jasig rubyon rails
_zaMmer_
 
Revised Rails Engine Patterns for Montreal.rb meetup Oct 16, 2012
Revised Rails Engine Patterns for Montreal.rb meetup Oct 16, 2012Revised Rails Engine Patterns for Montreal.rb meetup Oct 16, 2012
Revised Rails Engine Patterns for Montreal.rb meetup Oct 16, 2012
Andy Maleh
 

Semelhante a 2007/09/29 PHP to Rails - Webキャリアさん主催 ”PHPプログラマの為のRuby on Rails入門” (20)

Rails introduction
Rails introductionRails introduction
Rails introduction
 
Learning to code for startup mvp session 3
Learning to code for startup mvp session 3Learning to code for startup mvp session 3
Learning to code for startup mvp session 3
 
Ruby on Rails: Coding Guideline
Ruby on Rails: Coding GuidelineRuby on Rails: Coding Guideline
Ruby on Rails: Coding Guideline
 
Ruby On Rails Tutorial
Ruby On Rails TutorialRuby On Rails Tutorial
Ruby On Rails Tutorial
 
Introduction à Ruby
Introduction à RubyIntroduction à Ruby
Introduction à Ruby
 
Simple mvc4 prepared by gigin krishnan
Simple mvc4 prepared by gigin krishnanSimple mvc4 prepared by gigin krishnan
Simple mvc4 prepared by gigin krishnan
 
Pragmatic Patterns of Ruby on Rails - Ruby Kaigi2009
Pragmatic Patterns of Ruby on Rails - Ruby Kaigi2009Pragmatic Patterns of Ruby on Rails - Ruby Kaigi2009
Pragmatic Patterns of Ruby on Rails - Ruby Kaigi2009
 
Curso rails
Curso railsCurso rails
Curso rails
 
Mini Rails Framework
Mini Rails FrameworkMini Rails Framework
Mini Rails Framework
 
Some ways to DRY in Rails
Some ways to DRY in Rails Some ways to DRY in Rails
Some ways to DRY in Rails
 
Rails course day 4
Rails course day 4Rails course day 4
Rails course day 4
 
Apache Rewrite Rules
Apache Rewrite RulesApache Rewrite Rules
Apache Rewrite Rules
 
Ruby on Rails introduction
Ruby on Rails introduction Ruby on Rails introduction
Ruby on Rails introduction
 
Trailblazer Introduction by Nick Sutterer
Trailblazer Introduction by Nick SuttererTrailblazer Introduction by Nick Sutterer
Trailblazer Introduction by Nick Sutterer
 
What's New in Spring 3.1
What's New in Spring 3.1What's New in Spring 3.1
What's New in Spring 3.1
 
Jasig Rubyon Rails
Jasig Rubyon RailsJasig Rubyon Rails
Jasig Rubyon Rails
 
Apache - Mod-Rewrite
Apache - Mod-RewriteApache - Mod-Rewrite
Apache - Mod-Rewrite
 
Jasig rubyon rails
Jasig rubyon railsJasig rubyon rails
Jasig rubyon rails
 
Jasig rubyon rails
Jasig rubyon railsJasig rubyon rails
Jasig rubyon rails
 
Revised Rails Engine Patterns for Montreal.rb meetup Oct 16, 2012
Revised Rails Engine Patterns for Montreal.rb meetup Oct 16, 2012Revised Rails Engine Patterns for Montreal.rb meetup Oct 16, 2012
Revised Rails Engine Patterns for Montreal.rb meetup Oct 16, 2012
 

Mais de Yuichiro MASUI (11)

マッシュアップ沖縄版 おまけ:OpenSocail
マッシュアップ沖縄版 おまけ:OpenSocailマッシュアップ沖縄版 おまけ:OpenSocail
マッシュアップ沖縄版 おまけ:OpenSocail
 
OSC2007-niigata - mashup
OSC2007-niigata - mashupOSC2007-niigata - mashup
OSC2007-niigata - mashup
 
Railsチュートリアル
RailsチュートリアルRailsチュートリアル
Railsチュートリアル
 
InstantRails how to
InstantRails how toInstantRails how to
InstantRails how to
 
Rubyの基礎
Rubyの基礎Rubyの基礎
Rubyの基礎
 
PukiWiki
PukiWikiPukiWiki
PukiWiki
 
1時間で作るマッシュアップサービス(関西版)
1時間で作るマッシュアップサービス(関西版)1時間で作るマッシュアップサービス(関西版)
1時間で作るマッシュアップサービス(関西版)
 
Masuidrive Working Style
Masuidrive Working StyleMasuidrive Working Style
Masuidrive Working Style
 
Ruby de Rails
Ruby de RailsRuby de Rails
Ruby de Rails
 
How to build 1 hour mashup site
How to build 1 hour mashup site How to build 1 hour mashup site
How to build 1 hour mashup site
 
Furo Grammer
Furo GrammerFuro Grammer
Furo Grammer
 

Último

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Último (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 

2007/09/29 PHP to Rails - Webキャリアさん主催 ”PHPプログラマの為のRuby on Rails入門”

  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25. class User < ActiveRecord::Base end
  • 26.
  • 27.
  • 28. class User < ActiveRecord::Base has_many :books end
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36. class User < ActiveRecord::Base set_table_name 'user' set_primary_key 'pkey' end
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42. ITPro
  • 43.
  • 44.
  • 45.
  • 46.
  • 47.
  • 48.
  • 49.
  • 50.
  • 51.
  • 52.
  • 53.
  • 54.
  • 55.
  • 56.
  • 57.
  • 58.
  • 59.
  • 60.
  • 61.
  • 62.
  • 63.
  • 64.
  • 65.
  • 66.
  • 67.
  • 68.
  • 69.
  • 70.
  • 71.
  • 72.
  • 73.
  • 74.
  • 75.
  • 76.
  • 77.
  • 78.
  • 79.
  • 80.
  • 81.
  • 82.
  • 83.
  • 85.
  • 86.
  • 87.
  • 88.
  • 89.
  • 90.
  • 92.
  • 93.
  • 94.
  • 95.
  • 96.
  • 97.
  • 98.
  • 99.
  • 100.
  • 101.
  • 102.
  • 103.
  • 104.
  • 105.
  • 106.
  • 107.
  • 108.
  • 109.
  • 110.
  • 111.
  • 112. DB
  • 113.
  • 114.
  • 115.
  • 116.
  • 117.
  • 118.
  • 119.
  • 120.
  • 121.
  • 123.
  • 124.
  • 125. Rails
  • 126.
  • 127.
  • 128.
  • 129.
  • 130.
  • 131.
  • 132.
  • 133.
  • 134.
  • 135.
  • 136.
  • 137.
  • 138.
  • 139. Rails
  • 140.
  • 141.
  • 142.
  • 143.
  • 144.
  • 145.
  • 146.
  • 147.
  • 148.
  • 149.
  • 150.
  • 151. View Controller Model Rails mongrel
  • 152. View Controller Model
  • 153. View Controller Model URL params[]
  • 154. View Controller URL Model URL params[]
  • 155. View Controller Model.find,model.save URL Model URL params[]
  • 156. View Controller Model.find,model.save URL Model URL params[]
  • 157. View Controller Model.find,model.save URL Model URL params[]
  • 158.
  • 159.
  • 160. Rails
  • 161.
  • 162.
  • 163.
  • 164.
  • 165.
  • 166.
  • 168. Todo paginate HTML
  • 169.
  • 170.
  • 171.
  • 172.
  • 173.
  • 174.
  • 175.
  • 176. Todo edit id 1
  • 177.
  • 178. :partial _ .rhtml
  • 179. @todo <textarea> @todo.description
  • 180.
  • 182.
  • 183.
  • 184.
  • 185.
  • 187.
  • 188.
  • 189.
  • 190.
  • 191.
  • 192.
  • 193.
  • 194.
  • 195.
  • 196.
  • 197.
  • 198.
  • 199.
  • 200.
  • 201.
  • 202.
  • 203.
  • 204.
  • 205.
  • 206. class
  • 207.
  • 208.
  • 209.
  • 210.
  • 211.
  • 212. Linux
  • 213. Linux