On 9 November 2012 07:27, Erwin <[email protected]> wrote:
> When I have this pattern
>
> sign_me(@user, :event => :authentication, :subdomain => subdomain)
>
> how can I write it to avoid sending the :subdomain option if subdomain.nil?
> ( if possible ..)
>
> sign_me(@user, :event => :authentication #?, :subdomain => subdomain
> unless subdomain.nil? )
You could try
sign_me(@user, :event => :authentication, (:subdomain =>
subdomain unless subdomain.nil?) )
or
sign_me(@user, :event => :authentication, :subdomain =>
(subdomain unless subdomain.nil?) )
Colin
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msg/rubyonrails-talk/-/TOTAudTTAa8J.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.