This actually looks very pretty, Bryan
On Jun 5, 2014 5:55 PM, "Bryan Yap" <notifications@github.com> wrote:

> In app/controllers/authentications_controller.rb:
>
> >      end
> >
> > -    if current_user && omniauth['provider']=='github' && current_user.github_profile_url.blank?
> > -      link_github_profile
> > +    if current_user.present?
> > +      CreateAuthentication.for(user, omniauth, provider_is_youtube?,
>
> I have been thinking about our syntax for services, and I have a proposal,
> let me know what you think @johnnymo87 <https://github.com/johnnymo87>,
> @cored <https://github.com/cored>, @sampritipanda
> <https://github.com/sampritipanda>. I drew inspiration from Rails
> respond_to block, we could try something like:
>
> CreateAuthentication.for(...) do |response|
>   response.success { redirect_to(oauth_path, notice: 'xxx') }
>   response.failure { redirect_to(oauth_path, alert: 'xxx') }end
>
> This is a construct familiar to many rails developers, and personally I
> think it is preferable to passing multiple lambdas as function arguments.
> What do you guys think?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/AgileVentures/WebsiteOne/pull/428/files#r13467088>.
>