Displaying 20 results from an estimated 600 matches similar to: "@article.article_groups.delete_if... Dosn't work!"
2006 Nov 04
0
@article.article_groups.delete_if... Dosn''t work!
If I try:
@article.article_groups.delete_if {|x|
x.group_id == x.group_id
}
It does nothing.
If I try:
articletmp.article_groups.each{ |x|
@article.article_groups.delete(y)
}
It deletes some of the groups.
@article.article_groups.clear
works.
Why dosn''t the to first examples work as expected??
Do I have to put groups I don''t want to
2006 Feb 21
6
Select articles from group with id ''1'' and id ''2''
I have to tables: "articles" and "groups". Between I have
article_groups as a jointable. Now I want to select every article who
is a member of group with id ''1'' and id ''2''. Whats best way to get
that?
Extract from schemas:
CREATE TABLE articles (
id int auto_increment,
ingress text NOT NULL,
story_text longtext,
constraint fk_items_users
2007 Jul 26
3
tc filter not work, why?
I try to use tc on mips with linux-2.4.18 but the u32 filter dosn''t work
I added htb qdisc to linux-2.4.18 and use it to limit the speed in
LAN, it only work well on the default class, for example
tc qdisc add dev eth0 root handle 1: htb default 10
tc class add dev eth0 parent 1:0 classid 1:1 htb rate 2000kbit
tc class add dev eth0 parent 1:1 classid 1:10 htb rate 500kbit ceil 500kbit
2009 Feb 04
2
delete_if does not work on associations
I tried to user delete_if on an association:
class Group < ActiveRecord::Base
has_many :memberships, :dependent => :destroy
has_many :users, :through => :memberships
...
end
This is the controller method, trying to use delete_if. Although some
elements are removed (s2 < s1), the save method does not update the
association.
def intersect_or_remove_group
other_group =
2006 May 26
4
shouldn''t this work? - session[:array_of_objects].delete_if {|x| x.id == params[:id]}
I am saving an array of active record objects (college courses) in the
session as session[:course_list]. This is the cart for a registration
controller.
If a student chooses to delete the course from the list I get the :id
as params[:id].
However if I do
session[:course_list].delete_if {|x| x.id ==params[:id]}
does not work.
session[:course_list].delete_at(idx)
works. Ocourse to do this I have
2006 Aug 08
12
delete_if doesn''t work for has_and_belongs_to_many
I''m using Rails-1.1.4 with Ruby-1.8.4
So let''s say I have 2 model classes:
class Item
has_and_belongs_to_many :things
end
class Thing
has_and_belongs_to_many :items
end
i = Item.new
i.things << Thing.new( :value => "Something").save
i.things << Thing.new( :value => "Something Else" ).save
i.save
Fine, now I have two records in the
2006 Jun 04
6
Activerecord relations.
I''ve got two tables set up - Things and Users where Users have many
things and Things belongs to Users.
They''re connected by Things.user_id => User.id and Things.updated_by_id
=> User.id both in the Things model using Belongs_to and custom foreign
key for one of them.
Problem is when I''ve got the updated_by_id belongs_to I can''t add Things
using
2006 Feb 07
11
date in domU
Hi all,
where can I set the date in domU.
''ntpdate -u ...'' works but dosn''t set the date.
date MMDDhhmm has also no effect.
What can I do?
--
cu
Roland Kruggel mailto: rk-liste@gmx.de
System: Intel 3.2Ghz, Debian etch, 2.6.15, KDE 3.4
_______________________________________________
Xen-users mailing list
Xen-users@lists.xensource.com
2006 Apr 27
4
Up-dates
I started working on a chat program but, I''m having this problem
chatroom.rhtml
<div id="chatroom">
</div>
<%= periodically_call_remote( :update => "chatroom",
:url => {:action => :chat },
:frequency => 2) %>
chat.rhtml
<h1><%= @chat.room %> room.</h1>
2006 Apr 26
7
Not updating
I copied the scaffolding edit and update and made it like this,
Note: awnser is edit.
Admin_contoller.rb
def awnser
@question = Question.find(params[:id])
end
def update
@question = Question.find(params[:id])
if @question.update_attributes(params[:question])
flash[:notice] = ''Question was successfully updated.''
redirect_to :action => ''list''
2006 Feb 19
3
newbie wanting to understand controller action relationship
I still getting my feet wet with rails and I''m trying to learn some good
ways of working with link_to_remote.
I''m using the user and login engines and I have in my layout this...
link_to_remote( ''Login'', :update => ''main-query'',
:url =>{:action => ''login''},
2006 May 23
6
How to list all models of an application?!?
How can I get a list of all model classes in the domain of a Rails
application (all models, both in "app/models" and in
components/somedir/model.rb)?
Thanx in advance for your precious help!
Edoardo "Dado" Marcora
2006 May 27
2
Error, in my store provider.
Let me explain the subject title, store provider is Hackey, he''s a NPC
that sells items to my users.
<h1>Welcome to Hackey''s!</h1>
<h3>Catalog</h3>
<table border="2" bordercolor="red">
<% for items in @items -%>
<% temp12 = Item.find(items.item_id) -%>
<tr><td><%= @temp12.name
2007 Aug 30
4
Samba with ZFS ACL
Hi,
I''m looking for Samba, which work native ZFS ACL.
With ZFS almost everything work except native ZFS ACL.
I have learned on samba mailing list, that it dosn''t work while samba-3.2.0 will be released.
Has anyone knows any solution to work samba-3.0.25?
If any idea, please let me know.
thanks
This message posted from opensolaris.org
2006 May 31
1
Automatic .santize?
Hello and thanks in advance to those who post back,
I''m working on a calender but, it renders the data in the controller
then saves it as @code so I call it in the veiw <%= @code %>. So
everythings working and I add this line..
@event =
Event.find_by_date("#{@temp13.year}-#{@temp13.month}-#{@temp13.day}")
if @event == nil
@@td = "<td width=50 height=50
2009 Jun 11
1
Last Chaos dosn't install
Hi Community,
I tried to install the german version of "Last Chaos " (http://lastchaos.gamigo.de/download/) on my Linux PC
(Opensuse 11.1)
Code:
tim at arno:~> uname -a
Linux arno 2.6.27.23-0.1-default #1 SMP 2009-05-26 17:02:05 -0400 x86_64 x86_64 x86_64 GNU/Linux
tim at arno:~> rpm -q wine
wine-1.1.23-1.1
But there is an Error:
Code:
Error Number: 0x80040706
2014 Mar 26
1
The letter "ש" or "a" button in hebrew is by default dosn't write the requested letter.
I have been running CentOS and I have found out that there is a key that
is not defined well.
The "a" or "?" which actually causes by a button press to a sing which
is called "new shekel" or "Shekel Chadash" which is two letters together.
What can I do to fix it? maybe someone have seen this in the past?
Eliezer
2003 Oct 26
1
include & exclude dosn't work...
Hello rsync,
I run Rsync as standalone server (--daemon). Here is my rsync.conf
file
use chroot = yes
max connections = 10
#syslog facility = local5
log = /var/log/rsyncd.log
[mp3files]
path = /home/guitar
comment = directory
read only = yes
list = no
secrets file = /etc/rsyncd.secrets
auth users = gate1
# hosts allow =
# hosts deny =
2006 Mar 01
1
detect-renamed dosn't work?!
Hi lhere,
i'm trying the detect-renamed patch in 2.6.7pre2 in a really small
scenario. Having two dirs with some files rsyncing to destination.
First I have no delete switches on, at least I will need them.
Heres the command I use:
rsync -e "ssh -i /root/.ssh/srv-key" -r -p -o -g -v -z -l -t
--detect-renamed --stats /root/test/ srv:/root/test --progress (--fuzzy)
When I
2000 Mar 30
0
Samba dosn't seem to work when bridging is enabled under FreeBSD 3.4
Hi,
I have been trying to set up a network bridge on my FreeBSD 3.4 machine (hades),
and as soon as I enable the bridge, Samba stops servicing requests from both
sides of the network.
The following is a 'diagram' to give you an idea of my setup.
|------|
|----+Charon|
|-------| |----| | |------|
|Neptune+----+Hades+----|