From: Vikas Gholap Date: 2009-01-22T15:38:10+09:00 Subject: How to change ruby's global variable through onclick event? Hello all, I have problem that how to change ruby's global variable through onclick event.? my code is like in myvideo.html.erb file. -------------------------------------------------------------------------- More videos -------------------------------------------------------------------- through onclick how can i change variable declared in my_controller.rb ------------------------------------------------------- class myController < ApplicationController $moreVideo = false def moreVideo $moreVideo = true respond_to do |format| format.html { render_partial 'home/video_search' } end end end -------------------------------------------------------------- is there way to change $moreVideo=true through onclick or href of anchor tag given above. -- Posted via http://www.ruby-forum.com/.