@note.version is a number, is the version number, you are pulling the wrong
property

On Sat, Sep 11, 2010 at 11:31 PM, nobosh <[email protected]> wrote:

> If I update the code to:
>
> @current_userid = current_user.id
> @note.version.user_id = @current_userid
>
> Rails3 seems like that better, the error is now:
> undefined method `user_id=' for 1:Fixnum
>
>
>
> On Sep 11, 8:25 pm, nobosh <[email protected]> wrote:
> > Rails error'd on that....
> >
> > Error "Called id for nil, which would mistakenly be 4 -- if you really
> > wanted the id of nil, use object_id"
> >
> > On Sep 11, 8:20 pm, radhames brito <[email protected]> wrote:
> >
> >
> >
> > > this does not work?
> > > @book.version.user_id = @current_user.id    ?
> >
> > > On Sat, Sep 11, 2010 at 8:23 PM, nobosh <[email protected]> wrote:
> > > > Anyone using vestal_versions:
> > > >http://github.com/adamcooper/vestal_versions/
> >
> > > > How do you set the user_id in the versions table?
> >
> > > > tried:
> >
> > > > in:
> >
> > > > def update
> > > >  @book.version.user_id(@current_user.id)
> > > > and
> > > > @book.user_id(@current_user.id)
> >
> > > > both error
> >
> > > > thanks
> >
> > > > --
> > > > 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]<rubyonrails-talk%[email protected]><rubyonrails-talk%2Bunsubscrib
> [email protected]>
> > > > .
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/rubyonrails-talk?hl=en.
>
> --
> 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]<rubyonrails-talk%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>

-- 
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 this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to