BernardTolosajr/Orange-api — pull request #1 by DarwinLouis (2014-02-10 09:22:57+00:00)
Title: Merge Membership data when Sign in is successful

Upon signing in, if successful, include the Membership data in the response so that the flow will only call once and will not be redundant.

Expected result:

result = {:success => true, :access_token => @user.authentication_token,:token_type => 'bearer',
:user => {:id => @user.id, :full_name => @user.full_name},
:membership => {:id => @user.membership.id,
:name=>@user.membership.user.full_name,
:card_number=>@user.membership.card_no,
:member_since => @user.membership.created_at.strftime('%m/%d/%Y'),
:expiration_date => membership.expiration_date.strftime('%m/%d/%Y')}}.to_json