I am a newbie i am creating a report a bug application.
while the user clicks the link i need to catch up few hidden fields
like http_user_agent and save it database.
So i did something like this
<%= link_to “Report Bug”, :controller => ‘bug’, :action =>
‘new’, :http:user_agent => request.env[‘HTTP_USER_AGENT’]%>
I have a controller in which i didnt include any code for catching the
hidden_field .The controller works just fine in getting the statements
from the user saving it in the database.
but couldnt figure how to pass the hidden fileds along with
class BugController < ApplicationController
@bug = Bug.new
@bug = Bug.new(params[:bug])
redirect_to :action=> ‘index’
flash[:notice] = ‘please enter your statements’
redirect_to :action =>‘new’
and then views new.rhtml and index.rhtml.
so how should i go abt collecting the env variables…
let me know any suggestion