I am tryign to access the rjs page element from my controller
but i get the following error:
undefined local variable or method `page’ for #DptController:0x6e85750
TIA
I am tryign to access the rjs page element from my controller
but i get the following error:
undefined local variable or method `page’ for #DptController:0x6e85750
TIA
Radiya Sojitrawala wrote:
I am tryign to access the rjs page element from my controller
but i get the following error:undefined local variable or method `page’ for #DptController:0x6e85750
TIA
That method is only there if you are inside an RJS template or a
render(:update) block. If you want you controller to render RJS, try
this:
render(:update) do |page|
page[‘some_id’].do_something
end
Alex W. wrote:
Radiya Sojitrawala wrote:
I am tryign to access the rjs page element from my controller
but i get the following error:undefined local variable or method `page’ for #DptController:0x6e85750
TIA
That method is only there if you are inside an RJS template or a
render(:update) block. If you want you controller to render RJS, try
this:render(:update) do |page|
page[‘some_id’].do_something
end
Thanks Alex,
I am new to ruby, rails and rjs. Is there a simple and complete tutorial
on this?
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs