Displaying 20 results from an estimated 2000 matches similar to: ""Common action" for a controller"
2006 May 02
4
Bug in rails ?
Hi !
I just have a simple question.
I am writing an app using rails to familiarize myself with the framework (which is pretty cool, by the way).
I just wanted to know why these two work differently (since "find" should be a synonym for "detect" according to the Pick Axe) :
current_item = @invoice.line_items.detect {|i| i.product.id == key}
current_item =
2006 Jul 26
2
return values from a function - basic question
I thought this would be simple, but I just cant seem to get it to work.
# only allow numbers. Need to check for nil / NAN
def saveHours(val)
if val < 0
val = 0
end
return val
end
current_item.product.v1 = checkValue(values[:val1])
current_item.product.v2 = checkValue(values[:val2])
but when I run the code, nothing is ever returned from the checkValue
function.
2005 Oct 15
1
Partials and controllers
Newbie question:
From a _form.rhtml file I have:
<%= render(:partial => ''item'', :collection => @items) %>
In _item.rhtml I have:
<% @tullt = h(item.body) %>
<%= @itemdb = Group.find(:all,
:conditions => "id = ''#{@tullt}''").map {|u| [u.name] }
%>
<%= @tullt %
I think it would be better to
2006 Jul 18
15
Agile Web Developement with Rails
I recently got a copy of the second addition in PDF
and got stuck on the Ajax portion using highlighting
page 128. While trying to make my cart flash I got an
RJS error when I click add to cart. I have gone back
and made sure my code matched what was in the book but
no help. I sent Dave an email and he rec''d this list.
Anybody got any good links for troubleshooting Ajax or
maybe have see
2006 Jul 03
0
Page 129 of Agile Web Dev on Rails (or pg141 of pdf!)
Hi - another question, sorry....
I''m trying to get the highlighting effect to work on the current_item.
The page refreshes fine, and then I get an error as the highlighting
code is fired:
page[:current_item].visual_effect :highlight,
:startcolor => "#88ff88",
:endcolor => "#114411"
The error
2006 Jun 08
19
Agile Web Dev (book) question: errors
This is kind of frustrating (but no doubt helpful in the long run) that
after following along and coding , and d/l the code the same error is
appearing.
For those who are familiar with the depot app, I''ve run into a problem after
fixing the cart to reflect quanitites. I worked through the intended error
messages but now have this appearing:
SyntaxError in StoreController#add_to_cart
2006 Jul 31
4
RJS to find an element
I''m trying to implement a remove from cart method based on the
examples in the second edition Agile book. I have everything working
except for the RJS that removes items from the cart. Ideally what
I''d like to do is highlight an element that I am deleting only if
there is more than one of that particular item in the cart. If the
item deleted is the only of
2006 Feb 05
4
Another layout question - Layouts on a per method basis - Layouts with AJAX
I feel I am very close to understanding how layouts are used in Rails:
Q1. I know one can specify a "default" layout for all methods in a controller by specifying
layout ''my-default-layout''
How can this be overridden for individual methods so when those methods are called/executed, the overridden layout will be used. Is this possible?
Q2. With no
2013 Feb 26
1
How to add static routes?
Hello
i have several libvirt hosts (CentOS6, kvm), each with an internal
libvirt "default" network with "forward mode='route'". I have two
questions concerning static routes.
To give some context: On each of my libvirt hosts there is a VM acting
as a OpenVPN-gateway to the other libvirt hosts.
[A] How can i add a persistant static route on the libvirt host to one
2006 Apr 24
7
Can you improve on this code?
# File app/models/timesheet.rb, line 27
27: def totals
28: totals = Hash.new
29: totals["Monday"] = totals["Tuesday"] = totals["Wednesday"] =
totals["Thursday"] = totals["Friday"] = totals["Saturday"] =
totals["Sunday"] = totals["Totals"]=0 #initialise all to zero
31:
32: for item in
2008 Oct 03
2
Filter chain halted as [:check_authentication] rendered_or_r
I have this page that you login in from. You get authenticated and then
bumped over to the appropriate page depending on what your role is:
Traveler, Travel Manager, Admin. All pieced work except for the role
asssociated with Travel Managers who get tossed out, apprarently when
they hit a before_filter to check authenication. However, it seams that
they are properly getting authenticated and moved
2016 Dec 27
2
Trouble with access to sysvol share using SMB2 or SMB3 protocol on client PC
Hi, guys.
I have an issue with accessing to my sysvol share with smb2 or smb3
clients. I have an issue with editing my Group Policy from Windows
7,8,8.1,10 or Windows Server 2012 clients with RSAT installed and
everything works fine when I edit group policy from Windows XP machine.
I disable SMB2 & SMB3 in my Windows server machine and it fix the problem,
but is it a correct workaround for my
2006 Jul 16
17
AWDWR question
In an early section on Action View, showing code being put directly
into the rhtml file:
<% require ''date''
DAY_NAMES = %w{ Sunday Monday Tuesday Wednesday Thursday Friday Saturday }
today = Date.today %>
<h1>Hello, Dave</h1>
<p>
It''s <%= DAY_NAMES[today.wday] %>.
Tomorrow is <%= DAY_NAMES[(today + 1).wday %>.
</p>
I get this
2006 Jun 21
7
acts_as_taggable and paginate?
Hi there,
I''ve been trying to paginate over a list of members that all share a tag in
common using the acts_as_taggable plugin. The regular way of paginating over
a collection doesn''t seem to work with acts_as_taggable. Here''s what my
method looks like that takes in a tag name, finds all the members that share
the tag and then displays all the members. Nothing too fancy
2010 Jun 18
2
Restrict Disk Usage
Hi Everyone,
Is there any way to restrict Disk usages per DomU? It would be to stop customers from hogging all the available disk time and slow everyone else down.
Apperently, Cloudmin can do this, but that costs money...
Any ideas would be appreciated
Thanks
_______________________________________________
Xen-users mailing list
Xen-users@lists.xensource.com
2006 Jun 29
1
R 2.3.0 + R-gnome + Ubuntu (i686 & amd64)
Hello,
I am trying to run R-gnome on my Debian distro (Ubuntu 6.06), but something
strange is happening. Inspite of having apperently sucessfully installed
Rgnome 2.3.0 I keep getting the error message below, saying that Rgnome is
not found. I have actually checked the folder and Rgnome is not being
properly installed.
I ran into this problem on both my 32 and 64 bits intallation of Debian.
Any
2010 Nov 26
1
WoW addons folder, where is it?
so, basically i need to install zygors guides, ive already paid for it and the regular .exe file wont open by itself, i tried unzipping the file and im supposed to put the unzipped file in the WoW/interface/addons folder apperently (or so says Google) anybody know what to do?
2005 Feb 20
2
No Command Line
Hello all,
I've just installed Wine 20040813 on a Linux Computer (SusE 9.2) without a
Native Windows environment. I've installed a few Windows software programs
and things seems to be ok for the most part.
One of my Applications will not run if I call it using wine direct from the
shell command line. If, however, i frst call 'winefile' and then start my
application from
2006 Sep 29
2
ApplicationHelper is not a parent of SomeHelper?
i have:
# file application_helper.rb
module ApplicationHelper
def load_components
@right_sidebar = ''some stuffs''
end
end
# file user_public/blog_helper.rb
module UserPublic::BlogHelper
def load_components
ApplicationHelper.load_components
@right_sidebar += ''{blog archive}''
end
end
the problem is, i want to load the
2005 Oct 14
2
ocfs2's bmap output
I'm writing a stackable file system and one of it's features is that it
can combine many sparse files into a single view. On ext2/3 I was using
bmap to give me the information needed, so for instance, if I created a
big sparse file and tacked on some information at the end on ext2/3 I'd
get something like
blade12:~# ~/a.out abc
File: abc Size: 30002 Blocks: 8 Blocksize: 4096
0