Displaying 20 results from an estimated 200 matches similar to: "Using a partial multiple times in a view"
2006 Feb 14
1
Another HABTM Question
Hi there,
I have a question on what would be the best way to save a HABTM model.
A posting habtm categories, and a category habtm postings.
class Category < ActiveRecord::Base
has_and_belongs_to_many :postings
end
class Posting < ActiveRecord::Base
has_and_belongs_to_many :categories
end
In my blog_controller, where the actual posting is saved, is where I
think I''m
2012 May 15
2
Timer Daemon doesn't start
Hey,
I have the problem that my timer daemon doesn't start. I checked my configuration more than two times and I don't find the failure. Maybe someone can help me and tell me where the failure could be.
--- syslog ---
May 13 21:50:34 s-monitor1 upsmon[1674]: UPS usv3 at localhost on battery
May 13 21:50:34 s-monitor1 upssched[855]: Executing command: ONBATT
May 13 21:50:34 s-monitor1
2006 Jun 09
5
Using link_to with an image tag & link text
Hi ,
I was trying to use link_to along with image_tag
to setup a link that would open in an external window.
But I was unable to make a link using both text & an image
So my current workaround looks like this inside a partial
where link is http://foo.com & text would be descriptive
<img src="images/arrow.gif" border="0"/> <%= link_to(text, link,
:popup
2013 Dec 05
0
Plea for a more loquacious nut
On Dec 4, 2013, at 3:35 PM, Roger Price wrote:
> I would like nut to become more loquacious, and to log a much more complete report of its activity. At present nut reports that its components have started operation but does not automatically log their activity when UPS's switch between OB and OL. I believe that this under-reporting of important facts is too minimalist - it would be
2013 Dec 04
5
Plea for a more loquacious nut
I would like nut to become more loquacious, and to log a much more
complete report of its activity. At present nut reports that its
components have started operation but does not automatically log their
activity when UPS's switch between OB and OL. I believe that this
under-reporting of important facts is too minimalist - it would be better
for system administrators and for the nut
2020 Mar 19
0
exec_cmd(/path/upssched-cmd event) returned 78
Hello,
not sure if it is a scripting problem or an owner/group problem but when
I try to send an email following en event using upssched-cmd, the script
exits on the line where I send the email with this message in syslog :
Mar 19 20:49:51 chaudron-nautique upssched[1377]:
exec_cmd(/path/upssched-cmd onbatt1) returned 78
The log messages prior to the email (logger -t upssched-cmd message)
2008 Mar 07
0
Piping logs to rotatelog
Mongrel clusters lets yuo pick a path to your logs with the "-l "
switch. I tried giving a pathc that contains the rotatelogs like
-l
|/usr/sbin/rotatelogs /var/log/mongrel.log 3600"
And it just gave me error. So I rolledup my sleeves and dig into:
1)
/usr/lib/ruby/gems/1.8/gems/mongrel_cluster-1.0.5/lib/mongrel_cluster/init.rb
2)
2008 Jun 20
0
Is it possible to execute commands without allocate pty?
Hi,
I am currently implementing SSH ver1 client for my school work and testing
it with OpenSSH servers. Unfortunately I cannot execute commands after
succesful login without allocate pty. My client send SSH_CMSG_EXEC_SHELL
packet on server, but dont receive any answer. According RFC defined SSH1,
server should send SSH_SMSG_SUCCESS or SSH_SMSG_FAILURE message. So I
tried send
2015 Apr 27
3
upssched setup
Hi Roger,
I get:
Apr 27 20:50:05 unifi upsmon[1022]: UPS ups on batteryApr 27 20:50:05 unifi upssched[2688]: Timer daemon startedApr 27 20:50:06 unifi upssched[2688]: New timer: onbatt (20 seconds)Apr 27 20:50:26 unifi upssched[2688]: Event: onbattApr 27 20:50:26 unifi upssched[2688]: exec_cmd(/sbin/upssched-cmd.sh onbatt) returned 126Apr 27 20:50:41 unifi upssched[2688]: Timer queue empty,
2006 May 17
2
error handling in upssched.c
While looking into Laurent Lesage's problem with upssched, I noticed
something in exec_cmd():
http://boxster.ghz.cc/projects/nut/browser/trunk/clients/upssched.c#L79
In the man pages for system(3) on both OS X and Linux (Debian sarge),
I do not see any mention of errno being set. The error code is
returned by system, and I am wondering if the "file not found" error
that Laurent saw
2013 Apr 18
0
problem with a script via upssched-cmd
Hello
I'm running a script via upssched
on a onbatt event, I want to sent a email, shutdown a windows server and shutdown an ubuntu server
When I run my script manually, all is ok but via upssched-cmd
it return "exec_cmd returned 255"
here is the script
#!/bin/bash
# send mail to admin
echo "ECO" | mail -s "ARRET SERVEURS NON PRIORITAIRES" moi at domaine.fr
net
2015 Apr 27
0
upssched setup
Hi,
The exec is returning 126 - "Command invoked cannot execute. A
permission or command not executable problem.".
Are you sure that the script is executable by the user running NUT? Do
you have SELinux enabled?
Regards,
Neil.
On 27/04/15 20:55, James Hammond wrote:
> Hi Roger,
>
> I get:
>
> Apr 27 20:50:05 unifi upsmon[1022]: UPS ups on battery
> Apr 27
2013 Apr 18
0
Nut-upsuser Digest, Vol 94, Issue 18
?Hello Sabine,
this seems as a problem with PATH env. variable; if you issue the command
by hand, you do so in an environment with PATH set so that
the binaries are found.
I guess that the nut user doesn't have so nice PATH, being non-interactive.
Try to add full paths to your binaries in the command and see what happens...
Regards,
vasek
--
Vaclav Krpec
NUT developer
2015 Apr 27
2
upssched setup
Gents,
Thanks, yes definitely a permissions problem. Roger pointed me in the correct direction with the command to add logging for the script. I have the shutdown working now but need to tighten up the permissions. Not too sure where to start with assigning the correct permissions.
Cheers,
James
> Date: Mon, 27 Apr 2015 21:25:45 +0100
> From: neil at dana.org.uk
> To: nut-upsuser at
2006 Apr 17
1
Effect.appear
Hi all,
Is there a way to use the onLoad event of a page to start the
Effect.appeareffect?
I''m trying like this, unfortunatly this does not work:
<html>
<head>
<%= javascript_include_tag :defaults %>
</head>
<body onload="new Effect.Appear(this);">
My Body
</body>
</html>
Any idea how to get this to work?
Kind regards,
Harm de
2006 Jun 18
2
newby issue with the date class
ok i have partial defined like this
<%=
d = Date.today
%>
<div class="date_container">
<div class="month"><%= Date::ABBR_DAYNAMES[d.wday] %></div>
<div class="day"><%= d.day %></div>
<div class="year"><%= Date::ABBR_MONTHNAMES[d.mon] %></div>
</div> <!-- date container-->
2007 May 05
0
integration with movtable
Hi,
I''m trying to integrate movtable to display some data. The file that
lists out the partials to display the data looks like this:
<html>
<head>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<title>Movtable - List</title>
<%= stylesheet_link_tag
2007 Oct 12
6
locals in partials
hiya, in specing a partial, how can i assign a local var that is
normally passed via :locals ? i tried adding :locals => to the render
call but that doesnt seem to take
linoj
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/rspec-users/attachments/20071012/fd0acd92/attachment.html
2007 Nov 03
1
Specs for Helpers that call render
The helper spec I am writing tests a helper method that calls render.
##
module HelperHelper
def render_partial
render :partial => ''partial''
end
end
##
The helper spec.
##
describe HelperHelper do
it "should render partial" do
render_partial.should_not == nil
end
end
##
The output generated
##
$ spec spec/helpers/home_helper_spec.rb
.F
1)
2006 Aug 01
2
Partial Naming Madness
Hi, I am having the following issue with a partial. During initial page
load, I am doing a "render_partial_collect ''foo'', @foos", and all goes
well. Each foo partial makes use of a variable inside called ''foo'' (and
can get foo.id etc).
After all the partials are loaded, I need to :update a div corresponding
to one of the partials (ie re-load the