ok - i've managed to get the following to render correctly (from within the application.html.erb file:
<% if @user.invitation_limit > 0 %> <%= link_to 'Send invite', :controller => 'invitations', :action => 'new' %> (<%= @user.invitation_limit %> left) <% end %> However, when the link is clicked (send invite), I now get the error mentioned before: You have a nil object when you didn't expect it! The error occurred while evaluating nil.invitation_limit Any ideas where i need to make the change now, so this works? Thanks again... On 10 Feb, 20:21, RubyonRails_newbie <craigwest...@googlemail.com> wrote: > Hmmm.. > > It's still not working, even when I've added it in the invitations > view page. > > :-( > > On 10 Feb, 20:02, Marnen Laibow-Koser <li...@ruby-forum.com> wrote: > > > > > Craig Westmoreland wrote: > > > in that case, would it make more sense to add it to a page when a user > > > is already logged in? > > > Heck yes. > > > > I've just tried adding it to the invitation's index page, and i get > > > the same issue... > > > > sorry.... > > > Best, > > -- > > Marnen Laibow-Koserhttp://www.marnen.org > > mar...@marnen.org > > -- > > Posted viahttp://www.ruby-forum.com/. -- 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 rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.