Hi!
I cant use funtions like link_to_remote in self defined calsses/objects
used from within my controller? Is there a readon for this, I dont
understand what libraries etc I need to include to get it running!
Best regards
/Rickard
Hi!
I cant use funtions like link_to_remote in self defined calsses/objects
used from within my controller? Is there a readon for this, I dont
understand what libraries etc I need to include to get it running!
Best regards
/Rickard
hi!
Is there no one that has experienced the same problem? I’m getting sick
of this! Is it a bad description of the problem?
If this doesnt work, there must be a good work around, or I probably
have to leave ruby on rails. The thing is that I have an object in which
I want to generate HTML and return it back to the controller which in
turn displays it on the web page.
link_to(“MyPage”, { :action => “run” }, :popup => [‘new_window’,
‘height=300,width=600’])
NoMethodError in Init_test#index
You have a nil object when you didn’t expect it!
The error occured while evaluating nil.url_for
RAILS_ROOT: .
Application Trace | Framework Trace | Full Trace
url_for' #{RAILS_ROOT}...Ruby/lib/ruby/gems/1.8/gems/actionpack-1.10.2/lib/action_view/helpers/url_helper.rb:49:in
link_to’…the same problem is with e.g link_to_remote()
I also found on the web a parameter called :controller => ‘ctrl_name’
which I thought could solve my problems since @controller at line 18
seems to be nil. But I cant get it to work and I have not found any
documentation around it!
/Rickard
rickthemick wrote:
Hi!
I cant use funtions like link_to_remote in self defined calsses/objects
used from within my controller? Is there a readon for this, I dont
understand what libraries etc I need to include to get it running!Best regards
/Rickard
On Dec 5, 2005, at 12:02 AM, rickthemick wrote:
NoMethodError in Init_test#index
#{RAILS_ROOT}…Ruby/lib/ruby/gems/1.8/gems/actionpack-1.10.2/lib/
include ActionView::Helpers::TagHelper
(options.symbolize_keys) ifBest regards
/Rickard
Rickard-
Link_to_remote and friends are meant to be used in your views only.
Why are you trying to use them in your controller? Surely there is a
workaround you can use to move the code to the view where it belongs?
Cheers-
-Ezra Z.
Yakima Herald-Republic
WebMaster
http://yakimaherald.com
509-577-7732
[email protected]
I want to do this in the object created from my controller:
link_to(“MyPage”, { :action => “run” }, :popup => [‘new_window’,
‘height=300,width=600’])
Is there a reason you can’t do this in your view?
Seems to be no problem at all after taking a look at my code, thanks
again for your input!
/R
ezra wrote:
On Dec 5, 2005, at 12:02 AM, rickthemick wrote:
NoMethodError in Init_test#index
#{RAILS_ROOT}…Ruby/lib/ruby/gems/1.8/gems/actionpack-1.10.2/lib/
include ActionView::Helpers::TagHelper
(options.symbolize_keys) ifBest regards
/RickardRickard-
Link_to_remote and friends are meant to be used in your views only.
Why are you trying to use them in your controller? Surely there is a
workaround you can use to move the code to the view where it belongs?Cheers-
-Ezra Z.
Yakima Herald-Republic
WebMaster
http://yakimaherald.com
509-577-7732
[email protected]
Hi all!
Thanks for your replies and directions. Well, the thing is that the code
is quite complex and I probably have deceases from previous server side
scripting. When “link_to_remote” worked with just a few includes (in the
controller) I though this was appropriate.
In more detail I want to update multiple
The update_element_function contains the generated HTML string
(including the output of link_to_remote calls) and I guess this is not
possible to do in the view…
/R
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