V
Vikas Gholap
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.
--------------------------------------------------------------------------
<a id='more_videos_link' class='ActionLink' href=\"#\"
onclick=\"something that change variable\">More videos</a>
--------------------------------------------------------------------
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
I have problem that how to change ruby's global variable through onclick
event.?
my code is like in myvideo.html.erb file.
--------------------------------------------------------------------------
<a id='more_videos_link' class='ActionLink' href=\"#\"
onclick=\"something that change variable\">More videos</a>
--------------------------------------------------------------------
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