Action controller
Upcoming SlideShare
Loading in...5
×
 

Action controller

on

  • 309 views

A short 8 minute or less presentation by 3 Boots in Dev Bootcamp(SF), a 9 week intensive to turn us into junior web developers. ...

A short 8 minute or less presentation by 3 Boots in Dev Bootcamp(SF), a 9 week intensive to turn us into junior web developers.

http://github.com/Stephenitis
https://github.com/fmackojc
https://github.com/avalon9000

Statistics

Views

Total Views
309
Views on SlideShare
309
Embed Views
0

Actions

Likes
0
Downloads
1
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Action controller Action controller Presentation Transcript

  • ActionControllerby these guys & galStephen(itis) Fab(ulous) (Toyota)AvalonPhase 3 @devbootcamp Spring 2013Monday, May 13, 13
  • What is ActionController?MVCMonday, May 13, 13
  • Like a switchboardoperatorRoutesControllerMonday, May 13, 13
  • Differences• Route is included and defined• View is defined by user• Manually createdRailsSinatra• Route is not included• Rendered view is defined byconvention• Actions can be automaticallygenerated by scaffoldingMonday, May 13, 13
  • So where are the routesand views?get ‘/posts’ => post#indexapp/views/posts/index.html.erb/app/config/routes.rbMonday, May 13, 13
  • Convention overconfiguration• With Sinatra you are free to name anddefine your controller actions/routes• examples:• get “/showindex” or post “/creatething”• “In Rails there should be no guessing to what acontroller action is doing” - ShadiMonday, May 13, 13
  • CRUD ACTIONS• CREATE• READ• UPDATE• DESTROYMonday, May 13, 13
  • Controller:light on logicMonday, May 13, 13
  • READMonday, May 13, 13
  • CREATEMonday, May 13, 13
  • UPDATEMonday, May 13, 13
  • DESTROYMonday, May 13, 13
  • FiltersMonday, May 13, 13
  • Some more for youto explore• Sessions• Flashes• Rendering xml and jsonMonday, May 13, 13
  • Questions?Monday, May 13, 13