A class method on user.  I couldn't think of an appropriate name.
 find_by_user_key?


On Thu, Aug 22, 2013 at 2:29 PM, cjcolvar <notifications@github.com> wrote:

> In app/models/access_control_step.rb:
>
> > @@ -26,7 +26,8 @@ def execute context
> >        # TO DO: Implement me
> >        logger.debug "<< Access flag = #{context[:access]} >>"
> >
> > -      unless User.where(username: context[:user]).first.ability.can? :update_access_control, mediaobject
> > +      user = User.where({ Devise.authentication_keys.first => context[:user]}).first
>
> Hmmm...it would be nice if there was a cleaner way to do this. This
> reminds me that I wanted a user_key_key when I was working on this kind of
> thing before.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/avalonmediasystem/avalon/pull/113/files#r5934318>
> .
>



-- 
website: http://adamhallett.com
cell: 815.793.1928