From: Jim Ruther Nill <jvn...@gmail.com>
Date: Fri, 9 Nov 2012 16:10:02 +0800
Local: Fri, Nov 9 2012 3:10 am
Subject: Re: [Rails] method conditional option pattern
On Fri, Nov 9, 2012 at 3:27 PM, Erwin <yves_duf...@mac.com> wrote:
I'm not sure if it's possible to do it in a single line (as far as you want
> When I have this pattern > sign_me(@user, :event => :authentication, :subdomain => subdomain)
> how can I write it to avoid sending the :subdomain option if
> sign_me(@user, :event => :authentication #?, :subdomain =>
to have a tidy code) opts = { event: :authentication }
sign_me @user, opts
> --
------------------------------------------------------------- visit my blog at http://jimlabs.heroku.com You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||