Commit f523940

mo khan <mo@mokhan.ca>
2013-04-01 02:00:42
rename restaurant to review
1 parent e2b5768
Changed files (2)
app/controllers/commands/add_restaurant_command.rb → app/controllers/commands/add_review_command.rb
@@ -1,4 +1,4 @@
-class AddRestaurantCommand
+class AddReviewCommand
   def initialize(restaurant_name_textbox)
     @textbox = restaurant_name_textbox
   end
app/controllers/restaurant_controller.rb → app/controllers/review_controller.rb
@@ -1,18 +1,13 @@
-class RestaurantController < UIViewController
+class ReviewController < UIViewController
   def viewDidLoad
     super
-    self.title = "Restaurant"
+    self.title = "Review"
     self.view.backgroundColor = UIColor.whiteColor
 
     @textbox = Build.textbox([[0,0], [160, 26]]).centered_within(self.view).build
     self.add_control(@textbox)
 
-    command = AddRestaurantCommand.new(@textbox)
-    button = Build
-      .button("Add Restaurant")
-      .centered(CGPointMake(self.view.frame.size.width / 2, @textbox.center.y + 40))
-      .when_clicked(command)
-      .build
+    button = Build.button("Add Review").centered(CGPointMake(self.view.frame.size.width / 2, @textbox.center.y + 40)).when_clicked(AddReviewCommand.new(@textbox)).build
 
     add_control(button)
   end