I have a view which links to an action in my controller, lets call this
controller "pages". Let''s call this action, runScript. This
action calls
a ksh script which executes some commands, takes the output, and puts it
in a .txt file which is located inside my view/pages/ folder as
output.txt . Then, my runScript.html.erb has:
<pre> <%= render :file =>
''/path/to/application/app/views/pages/output.txt'' %>
</pre>
This simply renders the output.txt file onto the page. Now, the problem
is that I have a dropdown menu on my index.html.erb which allows me to
pick a host and then has a go button which allows me to call the
runScript action on that host. However, the first host I run it on, it
displays the correct output for that host. After that, for every other
host I call the action on, it displays the output from the first host I
run it on. Keep in mind, I am overwriting output.txt every time I call
this action. I even check output.txt every time I call the action, and
the contents of output.txt have been updated, but what''s displayed on
my
rails app stays the same as what is outputted from the first call of the
action.
Could this have something to do with overwriting output.txt. Do I need
to declare a seperate .txt file for every host? Even though I don''t see
that being the problem, because output.txt IS updated after every call,
it''s just the view which still displays the old output.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.