# Link\_to popup divorced from controller?

**URL:** <https://www.ruby-forum.com/t/link-to-popup-divorced-from-controller/120303>\
**Category:** Rails\
**Created:** [November 15, 2007, 5:29pm UTC](https://www.ruby-forum.com/t/link-to-popup-divorced-from-controller/120303 "2007-11-15T17:29:07Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![yachtman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/d07c76/32.png) [@yachtman](https://www.ruby-forum.com/u/yachtman)\
**Post date:** [November 15, 2007, 5:29pm UTC](https://www.ruby-forum.com/t/link-to-popup-divorced-from-controller/120303/1 "2007-11-15T17:29:07Z")

</div>

Here’s my case:  
Using a link\_to popup window to show a related help file of an element  
on a page.

The problem:  
Window pops up perfectly, but refuses to carryover @instance variables  
in the controller that I referenced in the link\_to command.

The tests:

- I have the right controller/class, because it renders a specific  
template, which is what it does.
- I have the right template/view, because it reflects all of the html  
and content–other than the variables.
- I instantiated @time = Time.now in the controller-class, but @time  
in the view does not show up. If I simply call \<%= Time.now %\> – it  
works, but this does explain why the controller is not sending the  
variables.

I am stumped??? Any insightful soul with an answer???

---

<div class="post-metadata">

**Author:** ![yachtman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/d07c76/32.png) [@yachtman](https://www.ruby-forum.com/u/yachtman)\
**Post date:** [November 15, 2007, 5:54pm UTC](https://www.ruby-forum.com/t/link-to-popup-divorced-from-controller/120303/2 "2007-11-15T17:54:23Z")

</div>

On 15 Nov 2007, at 16:28, yachtman wrote:

> The tests:
> 
> - I have the right controller/class, because it renders a specific  
> template, which is what it does.
> - I have the right template/view, because it reflects all of the html  
> and content–other than the variables.
> - I instantiated @time = Time.now in the controller-class, but @time  
> in the view does not show up. If I simply call \<%= Time.now %\> – it  
> works, but this does explain why the controller is not sending the  
> variables.

The fact that it’s a popup changes nothing: as far as rails is  
concerned these are 2 completetly separate requests.

Fred

---

<div class="post-metadata">

**Author:** ![yachtman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/d07c76/32.png) [@yachtman](https://www.ruby-forum.com/u/yachtman)\
**Post date:** [November 16, 2007, 4:51am UTC](https://www.ruby-forum.com/t/link-to-popup-divorced-from-controller/120303/3 "2007-11-16T04:51:35Z")

</div>

Is it possible the javascript negates the variables?

Here is my code…

### 

First the link in profile.rhtml  
\<%= link\_to “?”, { :action =\> “funny”}, :popup =\> [‘Help’,  
‘height=600px, width=600px’] %\>

### 

user\_controller.rb  
def funny  
render :layout =\> false  
@helpy = Help.find(:first)

end

### 

funny.rhtml

\<%= @helpy.content %\> should be here...

### Here is the error from the popup windo: NoMethodError in User#funny

Showing app/views/user/funny.rhtml where line #2 raised:

You have a nil object when you didn’t expect it!  
The error occurred while evaluating nil.content

Extracted source (around line #2):

1:  
2:

\<%= @helpy.content %\> should be here…

  
3:  
4:  
5:

RAILS\_ROOT: /Users/carsoncole/Desktop/gliptred/config/…  
Application Trace | Framework Trace | Full Trace

#{RAILS\_ROOT}/app/views/user/funny.rhtml:2:in  
`_run_rhtml_47app47views47user47funny46rhtml' #{RAILS_ROOT}/app/controllers/user_controller.rb:57:in `funny’  
/Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/  
powerpc/bin/mongrel\_rails:16:in `load’  
/Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/  
powerpc/bin/mongrel\_rails:16

/Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/  
powerpc/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action\_view/  
base.rb:326:in `send' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/ powerpc/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_view/ base.rb:326:in `compile\_and\_render\_template’  
/Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/  
powerpc/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action\_view/  
base.rb:301:in `render_template' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/ powerpc/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_view/ base.rb:260:in `render\_file’  
/Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/  
powerpc/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action\_controller/  
base.rb:806:in `render_file' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/ powerpc/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/ base.rb:777:in `render\_with\_no\_layout’  
/Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/  
powerpc/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action\_controller/  
layout.rb:256:in `render_without_benchmark' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/ powerpc/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/ benchmarking.rb:50:in `render’  
/Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/  
powerpc/lib/ruby/1.8/benchmark.rb:293:in `measure' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/ powerpc/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/ benchmarking.rb:50:in `render’  
/Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/  
powerpc/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action\_controller/  
base.rb:1095:in `send' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/ powerpc/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/ base.rb:1095:in `perform\_action\_without\_filters’  
/Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/  
powerpc/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action\_controller/  
filters.rb:632:in `call_filter' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/ powerpc/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/ filters.rb:638:in `call\_filter’  
/Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/  
powerpc/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action\_controller/  
filters.rb:438:in `call' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/ powerpc/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/ filters.rb:637:in `call\_filter’  
/Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/  
powerpc/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action\_controller/  
filters.rb:634:in `call_filter' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/ powerpc/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/ filters.rb:619:in `perform\_action\_without\_benchmark’  
/Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/  
powerpc/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action\_controller/  
benchmarking.rb:66:in `perform_action_without_rescue' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/ powerpc/lib/ruby/1.8/benchmark.rb:293:in `measure’  
/Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/  
powerpc/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action\_controller/  
benchmarking.rb:66:in `perform_action_without_rescue' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/ powerpc/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/ rescue.rb:83:in `perform\_action’  
/Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/  
powerpc/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action\_controller/  
base.rb:430:in `send' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/ powerpc/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/ base.rb:430:in `process\_without\_filters’  
/Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/  
powerpc/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action\_controller/  
filters.rb:624:in `process_without_session_management_support' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/ powerpc/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/ session_management.rb:114:in `process’  
/Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/  
powerpc/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action\_controller/  
base.rb:330:in `process' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/ powerpc/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in `dispatch’  
/Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/  
powerpc/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:  
78:in `process' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/ powerpc/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb: 76:in `synchronize’  
/Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/  
powerpc/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:  
76:in `process' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/ powerpc/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process\_client’  
/Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/  
powerpc/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in  
`each' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/ powerpc/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process\_client’  
/Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/  
powerpc/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in  
`run' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/ powerpc/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize’  
/Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/  
powerpc/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in  
`new' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/ powerpc/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run’  
/Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/  
powerpc/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in  
`initialize' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/ powerpc/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new’  
/Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/  
powerpc/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in  
`run' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/ powerpc/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/ configurator.rb:271:in `run’  
/Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/  
powerpc/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/  
configurator.rb:270:in `each' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/ powerpc/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/ configurator.rb:270:in `run’  
/Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/  
powerpc/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel\_rails:127:in  
`run' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/ powerpc/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb: 211:in `run’  
/Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/  
powerpc/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel\_rails:243

#{RAILS\_ROOT}/app/views/user/funny.rhtml:2:in  
`_run_rhtml_47app47views47user47funny46rhtml' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/ powerpc/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_view/ base.rb:326:in `send’  
/Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/  
powerpc/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action\_view/  
base.rb:326:in `compile_and_render_template' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/ powerpc/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_view/ base.rb:301:in `render\_template’  
/Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/  
powerpc/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action\_view/  
base.rb:260:in `render_file' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/ powerpc/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/ base.rb:806:in `render\_file’  
/Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/  
powerpc/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action\_controller/  
base.rb:777:in `render_with_no_layout' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/ powerpc/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/ layout.rb:256:in `render\_without\_benchmark’  
/Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/  
powerpc/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action\_controller/  
benchmarking.rb:50:in `render' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/ powerpc/lib/ruby/1.8/benchmark.rb:293:in `measure’  
/Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/  
powerpc/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action\_controller/  
benchmarking.rb:50:in `render' #{RAILS_ROOT}/app/controllers/user_controller.rb:57:in `funny’  
/Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/  
powerpc/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action\_controller/  
base.rb:1095:in `send' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/ powerpc/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/ base.rb:1095:in `perform\_action\_without\_filters’  
/Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/  
powerpc/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action\_controller/  
filters.rb:632:in `call_filter' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/ powerpc/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/ filters.rb:638:in `call\_filter’  
/Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/  
powerpc/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action\_controller/  
filters.rb:438:in `call' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/ powerpc/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/ filters.rb:637:in `call\_filter’  
/Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/  
powerpc/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action\_controller/  
filters.rb:634:in `call_filter' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/ powerpc/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/ filters.rb:619:in `perform\_action\_without\_benchmark’  
/Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/  
powerpc/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action\_controller/  
benchmarking.rb:66:in `perform_action_without_rescue' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/ powerpc/lib/ruby/1.8/benchmark.rb:293:in `measure’  
/Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/  
powerpc/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action\_controller/  
benchmarking.rb:66:in `perform_action_without_rescue' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/ powerpc/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/ rescue.rb:83:in `perform\_action’  
/Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/  
powerpc/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action\_controller/  
base.rb:430:in `send' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/ powerpc/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/ base.rb:430:in `process\_without\_filters’  
/Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/  
powerpc/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action\_controller/  
filters.rb:624:in `process_without_session_management_support' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/ powerpc/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/ session_management.rb:114:in `process’  
/Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/  
powerpc/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action\_controller/  
base.rb:330:in `process' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/ powerpc/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in `dispatch’  
/Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/  
powerpc/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:  
78:in `process' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/ powerpc/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb: 76:in `synchronize’  
/Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/  
powerpc/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:  
76:in `process' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/ powerpc/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:in `process\_client’  
/Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/  
powerpc/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in  
`each' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/ powerpc/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in `process\_client’  
/Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/  
powerpc/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in  
`run' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/ powerpc/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `initialize’  
/Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/  
powerpc/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in  
`new' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/ powerpc/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in `run’  
/Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/  
powerpc/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in  
`initialize' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/ powerpc/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in `new’  
/Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/  
powerpc/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in  
`run' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/ powerpc/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/ configurator.rb:271:in `run’  
/Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/  
powerpc/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/  
configurator.rb:270:in `each' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/ powerpc/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/ configurator.rb:270:in `run’  
/Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/  
powerpc/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel\_rails:127:in  
`run' /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/ powerpc/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb: 211:in `run’  
/Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/  
powerpc/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel\_rails:243  
/Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/  
powerpc/bin/mongrel\_rails:16:in `load’  
/Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/  
powerpc/bin/mongrel\_rails:16

On Nov 16, 12:52 am, Frederick C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![yachtman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/d07c76/32.png) [@yachtman](https://www.ruby-forum.com/u/yachtman)\
**Post date:** [November 16, 2007, 4:59am UTC](https://www.ruby-forum.com/t/link-to-popup-divorced-from-controller/120303/4 "2007-11-16T04:59:48Z")

</div>

And if I replace the

```
@helpy = Help.find(:first) [in the controller and the following

```

from the view] @helpy.content

which might be a database problem, with simply

@time = Time.now …and … @time

The popup generates fine with no errors, but there is no output for  
the variable–its blank!

---

<div class="post-metadata">

**Author:** ![yachtman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/d07c76/32.png) [@yachtman](https://www.ruby-forum.com/u/yachtman)\
**Post date:** [November 16, 2007, 4:59am UTC](https://www.ruby-forum.com/t/link-to-popup-divorced-from-controller/120303/5 "2007-11-16T04:59:13Z")

</div>

Not at all. Javascript runs on the client and the client never sees ruby  
variables. You need to set @helpy before you render the template:

def funny  
@helpy = Help.find(:first)  
render :layout =\> false  
end

-Bill

yachtman wrote:

> def funny  
> NoMethodError in User#funny  
> 3:  
> powerpc/bin/mongrel\_rails:16:in `load' powerpc/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_view/ /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/ /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/ filters.rb:638:in`call\_filter’  
> powerpc/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action\_controller/  
> powerpc/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action\_controller/  
> /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/  
> 78:in `process' powerpc/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/`new’  
> powerpc/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/  
> #{RAILS\_ROOT}/app/views/user/funny.rhtml:2:in  
> /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/  
> layout.rb:256:in `render_without_benchmark' powerpc/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/ /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/ filters.rb:619:in`perform\_action\_without\_benchmark’  
> rescue.rb:83:in `perform_action' powerpc/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/ /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/`each’  
> powerpc/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in  
> /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/  
> configurator.rb:270:in `run’  
> /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/
> 
> > > Window pops up perfectly, but refuses to carryover @instance variables  
> > > variables.
> > 
> > The fact that it’s apopupchanges nothing: as far as rails is  
> > concerned these are 2 completetly separate requests.
> > 
> > Fred

–  
Sincerely,

William P.

---

<div class="post-metadata">

**Author:** ![yachtman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/d07c76/32.png) [@yachtman](https://www.ruby-forum.com/u/yachtman)\
**Post date:** [November 16, 2007, 5:16am UTC](https://www.ruby-forum.com/t/link-to-popup-divorced-from-controller/120303/6 "2007-11-16T05:16:10Z")

</div>

🙂 No problem.

yachtman wrote:

> > Not at all. Javascript runs on the client and the client never sees ruby
> > 
> > > def funny  
> > > NoMethodError in User#funny  
> > > 3:  
> > > powerpc/bin/mongrel\_rails:16:in `load' powerpc/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_view/ /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/ /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/ filters.rb:638:in`call\_filter’  
> > > powerpc/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action\_controller/  
> > > powerpc/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action\_controller/  
> > > /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/  
> > > 78:in `process' powerpc/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/`new’  
> > > powerpc/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/  
> > > #{RAILS\_ROOT}/app/views/user/funny.rhtml:2:in  
> > > /Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/
> > 
> > …
> > 
> > read more \>\>

–  
Sincerely,

William P.

---

<div class="post-metadata">

**Author:** ![yachtman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/d07c76/32.png) [@yachtman](https://www.ruby-forum.com/u/yachtman)\
**Post date:** [November 16, 2007, 5:08am UTC](https://www.ruby-forum.com/t/link-to-popup-divorced-from-controller/120303/7 "2007-11-16T05:08:34Z")

</div>

Bill,

Thanks a kazillion! Your help is most appreciated. Totally makes  
sense–can’t believe that I missed the logic. Sometimes (and usually  
most of the time), it’s staring right at you.

Finally back to some productive work.
