How to access hidden fields

In my view I have on combo in that i load all subjects from SubjectMaster table by that i got id and name of selected subject.. so I take two hidden fields name and code. After this i want to store the name and code of that selected subject in my subject table

<% form_remote_for @subject do |f| %>

    <div> <label for="student_course">Select a Subject: </label></

   <div class="text-input-bg"><%= f.select :subject_master_id ,@subjects.map {|b| [b.name, b.id] } ,         {:prompt => 'Select Subject'} %>     <%= f.hidden_field :name, :value => @subjects.name %>     <%= f.hidden_field :code, :value => @subjects.code %>

These should be available in the params hash as params[:name] and params[:code]. However I am a bit confused, is not @subjects an array of subjects? If so then @subjects.name does not make sense.

Colin

This is a question/discussion for therubyonrails-talk list.