Hai Nitin,
Thank you once again...But i am not getting the id of the selected
radio button.After selecting and clicking "view details" link,it is
again directing to the same page.(readings/index)
readings/index.html.erb
<% for r in @readings %>
<%= radio_button_tag 'contact_preference_id', "#{r.id}", false %>
<%=h r.station.province %>
<%end%>
<%= link_to "View Details", :controller => "weather", :action =>
"index" %>
Weather Controller
def index
if request.post?
station = Station.find(params[:contact_preference_id])
@readings=CurrentReading.find_all_by_station_id(station)
else
redirect_to(:controller =>"readings",:action =>"index")
end
end
Thanks,
Veena
--
Posted via http://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 [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.