app/controllers/socials_controller.rb
# Verifies that a user id is provided as parameter; otherwise
# redirects to the home page.
# Assigns the @swimming_buddy instance when successful.
#
# == Params:
# id: the user id to be processed by most of the methods (see before filter above)
#
Verifies that a user id is provided as parameter; otherwise
redirects to the home page.
Assigns the @swimming_buddy instance when successful.

the user id to be processed by most of the methods
Verifies that a user id is provided as parameter ; otherwise redirects to the home page . Assigns the @swimming_buddy instance when successful . the user id to be processed by most of the methods
def verify_parameter
    user_id = params[:id].to_i
    @swimming_buddy = ( user_id > 0 ) ? User.find_by_id( user_id ) : nil
    unless ( @swimming_buddy )                      
      flash[:error] = I18n.t(:invalid_action_request)
      redirect_back( fallback_location: root_path ) and return
    end
  end
def verify_parameter user_id = params [ :id ] . to_i @swimming_buddy = ( user_id > 0 ) ? User . find_by_id ( user_id ) : nil unless ( @swimming_buddy ) flash [ :error ] = I18n . t ( :invalid_action_request ) redirect_back ( fallback_location : root_path ) and return end end
Verifies that a user id is provided as parameter; otherwise
redirects to the home page.
Verifies that a user id is provided as parameter ; otherwise redirects to the home page .
# Check swimming buddy existance