Hi
Since I am noob with ruby still I have question. This is my setup.
2 tables and their fields.
Users table
Hi
Since I am noob with ruby still I have question. This is my setup.
2 tables and their fields.
Users table
Well there is and it works fine. But thats not the thing what I am asking here. You can think that loginname = request.env['REMOTE_USER'] could be anything like loginname=jane
and I figured it out
<% @imitems.each do |imitem| %> <% if imitem.id == user.imitem_id %> <%= imitem.grpname %> <% end %> <% end %>
also needed to add on models
user.rb
has_many :imitems
imitem.rb
belongs_to :user
I didn’t believe that and I even tested it myself. I put:
“puts request.env[‘REMOTE_USER’]” in my blogs_controller index action and checked it in Firefox on Windows XP
It returned nil.
I checked it on IE7 on WindowsXP
It returned nil.
I checked it on Firefox in Ubuntu.
It returned nil.