On Martes, 7 de Diciembre de 2010 17:30:12 Jerome Stonebridge escribió:
> hello,
>
> I'm trying to use the widget style, <%= render :active_scaffold => 'posts',
> :constraints => {:user_id => current_user.id} -%>
>
> this is in a home controller, the posts controller has authentication
> required by devise (before_filter :authenticate_user!)
>
> even though the user is logged in, it errors out
>
> undefined method `authenticate!' for nil:NilClass
> Extracted source (around line #1):
>
> 1: <%= render :active_scaffold => 'posts', :constraints => {:user_id =>
> current_user.id} -%>
>
> if I skip the before_filter in the posts controller then it works fine, so
> I kinda think that there is something strange about how the widget style
> is getting its data like its not passing the logged in user data through.
I suppose it's a render_component bug which don't keep the session. Look at
that plugin
--
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 50.018 Zaragoza
T) 902 021 404 F) 976 52 98 07 E) [email protected]
--
You received this message because you are subscribed to the Google Groups
"ActiveScaffold : Ruby on Rails plugin" 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 this group at
http://groups.google.com/group/activescaffold?hl=en.