On 9 June 2010 09:12, swetha <[email protected]> wrote:
>
> Hi ,
>
> I am having a problem in sending loggedin user and also his website
> name as paramters .So that he can have preview of that.
>
> Relationship : I have 2 models user an website and relationship
> between them is
> user :has_one website
>
>
> So when i  click on <%= link_to
> 'preview' ,:controller=>'home',:action=>'index' %> , in this i need to
> send respective user who has logged in and also his corresponding
> website. SO how can i send these values as paramters.

That rather depends on how you are handling logging in.  Possibly you
have stored the current logged in user id in the session?  If so then
you do not need to pass it, just get it out of the session.  Once you
have the user then you can get his website as @user.website or
similar.

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

Reply via email to