Better handling of the callback param.

This commit is contained in:
Mark Rickert
2013-05-06 22:07:42 -04:00
parent c6707f938b
commit 1a1918eb12
2 changed files with 1 additions and 3 deletions

View File

@@ -5,7 +5,7 @@ module ProMotion::MotionTable
@refreshing = params[:refreshing] || "Refreshing data..."
@updated_format = params[:updated_format] || "Last updated at %s"
@updated_time_format = params[:updated_time_format] || "%l:%M %p"
@refreshable_callback = params[:callback]
@refreshable_callback = params[:callback]|| :on_refresh
@refresh = UIRefreshControl.alloc.init
@refresh.attributedTitle = NSAttributedString.alloc.initWithString(pull_message)

View File

@@ -26,8 +26,6 @@ module ProMotion
# Refreshable
def refreshable(params = {})
params[:callback] = :on_refresh unless params[:callback]
@refreshable_params = params
@refreshable = true
end