lib/routable/router.rb in routable-0.1.0 vs lib/routable/router.rb in routable-0.1.1
- old
+ new
@@ -75,10 +75,17 @@
# => router.navigation_controller pushes a UsersController
def open(url, animated = true)
controller_options = options_for_url(url)
if controller_options[:callback]
- controller_options[:callback].call
+ params = controller_options[:open_params]
+ callback = controller_options[:callback]
+ case callback.arity
+ when 0
+ callback.call
+ when 1
+ callback.call(params)
+ end
return
end
controller = controller_for_url(url)
if self.navigation_controller.modalViewController
\ No newline at end of file