Displaying 20 results from an estimated 400 matches similar to: "belongs_to <parent name>, :foreign_key modifier not working"
2006 Jul 11
4
checkboxes with a has_many :through relation
All,
I''m populating a view with checkboxes in a list.  I want to be able to 
assign to my has_many relationship using the post values of these 
checkboxes.  Essentially, I want to populate the relationship table 
which will create the correct join values in my model.
Here is my check_box_tag code:
<%= check_box_tag("@current_job[target_list_ids][]",
                  
2006 Mar 14
4
What does the send() method do on a model object?
All,
I did a scaffold for a model and I ended up with this code in 
list.rhtml:
 <% for column in TargetList.content_columns %>
    <td><%=h target_list.send(column.name) %></td>
  <% end %>
Where is the "send" method and what does it do?
I can''t find it on ActiveRecord::Base?   I assume that it returns a 
value based on the column id but I
2006 Mar 20
5
Wrap error_messages_for() call when no instance var present
I am trying to put some smarts around a call to
<%= error_messages_for %>
so that when I first come into this page i.e. when my instance variable 
@target_list has not been defined yet, the page doesn''t break.
I''m doing this:
<% if @target_list? %>
<%= error_messages_for ''target_list'' %>
<% end %>
I get a syntax error on line 1. 
2006 Mar 18
9
Using <%= text_field %> within partials is problematic
All,
Thanks for any help in advance.
I have what I think is a very straightforward partial template and I 
can''t figure out why a text_field call within it doesn''t work.
Here is my calling template:  lists.rhtml
<div id="target_lists">
  <%= render(:partial => "target_lists", :collection => @target_lists) 
%>
</div>
In the partial
2006 Jul 10
10
has_many :through and foreign key parameters
I just took my HABTM and turned it into a :through since my join table 
has another "non-joiny" attribute.
I went from this:
has_many_and_belongs_to :jobs,  :join_table => ''tablename'',
                   :foreign_key => ''x'',
                   :association_foreign_key => ''y''
to this:
has_many :jobs,  :through =>
2006 Jul 03
4
text_field doesn''t call overridden ActiveRecord getters
All,
In a template, I have
<%= text_field  :target_list, :DateReceived,
                                            { :title => ''uploaded_at'',
                                              :class => 
''target_list_info'',
                                              :disabled => ''true'' } %>
Here is the DateReceived method on my
2009 Nov 15
3
Error running lda example from Help File (MASS library )
Hello all,
I'm trying to run lda() from the MASS library but the Help example generates
the
following error:
#Code from example in lda Help file
# Resulting Error
>Error in if (targetlist[i] == stringname) { : argument is of length zero
My Current R Installation:
MacOSX: 10.5.8
R: 2.10.0
-- 
Gregory Riddick, PhD.
CRTA Research Fellow
National Institutes of Health
National
2009 Nov 17
1
Error running lda example: Session Info
>
> library(MASS)
> Iris <- data.frame(rbind(iris3[,,1], iris3[,,2], iris3[,,3]),
+                    Sp = rep(c("s","c","v"), rep(50,3)))
> train <- sample(1:150, 75)
> table(Iris$Sp[train])
 c  s  v
22 23 30
> z <- lda(Sp ~ ., Iris, prior = c(1,1,1)/3, subset = train)
Error in if (targetlist[i] == stringname) { : argument is of length
2018 Apr 28
4
sysvol files - 'The data area passed to a system call is too small'
On Fri, 27 Apr 2018 22:40:41 +0100
Jonathan Hunter via samba <samba at lists.samba.org> wrote:
> OK - some more detail I have found in the meantime.
> 
> I have compiled & ran listxattr, and I can now see a difference
> between a working and a broken file:
> 
> me at dc2:~/download $
> sudo ./listxattr /usr/local/samba/var/locks/sysvol/
>
2018 Apr 28
0
sysvol files - 'The data area passed to a system call is too small'
Hi Rowland
On 28 April 2018 at 09:17, Rowland Penny via samba <samba at lists.samba.org>
wrote:
> On Fri, 27 Apr 2018 22:40:41 +0100
> Jonathan Hunter via samba <samba at lists.samba.org> wrote:
>
> > OK - some more detail I have found in the meantime.
> >
> > I have compiled & ran listxattr, and I can now see a difference
> > between a working
2018 Apr 29
1
sysvol files - 'The data area passed to a system call is too small'
On Sun, 29 Apr 2018 00:42:47 +0100
Jonathan Hunter <jmhunter1 at gmail.com> wrote:
> Hi Rowland
> 
> On 28 April 2018 at 09:17, Rowland Penny via samba
> <samba at lists.samba.org> wrote:
> 
> > On Fri, 27 Apr 2018 22:40:41 +0100
> > Jonathan Hunter via samba <samba at lists.samba.org> wrote:
> >
> > > OK - some more detail I have found
2009 Dec 01
3
Using two (...) in a function
Hello R-Helpers,
I am not sure if it is a very simple question but I would like to use two
(...) in a function, for example,
this is a script where I would like to input the variable names (in one of
the (...)) and the variances associated to those variables which are not
calculated in the script because there is a specific software to calculate
it (the other (...))
data <- function
2018 Apr 29
1
sysvol files - 'The data area passed to a system call is too small'
HI,
We have done something similar using inotify. On the DC1. we watch the 
"/usr/local/samba/var/locks/sysvol" folder and if there is any change, 
(add, modify or delete), we run "samba-tool ntacl sysvolreset" and we 
push those changes to other DCs using rsync. We have created a shell 
script that is put in rc.local so that this starts even if the server 
reboots.
We chose
2018 Jan 03
2
Mixmonitor with b option
We have a server that records all calls so we set Mixmonitor with 
the b option to only record calls that are actually bridged. I notice 
that we have lost of 44 byte files in /var/spool/asterisk/monitor which 
correspond to calls that were not answered.  If a call is not answered I 
assume it was never bridged so why would Asterisk create a file?  Is 
there a way to avoid getting those empty
2013 Mar 14
4
plotting
Hi alL,
   I have a data frame with 4 columns: "value", "time",  "group" and "id".
   I would like to plot "value" vs. "time" with different colors for
different levels of "group" and
different symbols for different values of "id".
   I think I could do this but I would like to see what is an easier way to
plot
the
2004 Jan 08
3
Installing R on 64-bit Solaris 2.8 --- follow-up
Hello R-users,
thanks to Brian Ripley and Roger Peng for there prompt replies on
installing R on a Solaris 64-bit machine.  R is now running and seems to be
doing fine.  I realy would like to have access to the manuals so I can
climb most of the learning curve on my own -- I am a long time user of
Splus, hence I am not expecting the learning curve to be too steep.  On the
Sun machine that R is
2017 May 15
6
[IR question] Switching on pointers
Hi.
First of all, some context. I'm trying to implement a new  
functionality in an LLVM-based compiler and I need to take various  
actions based on the value of a given pointer, the possible values  
being the addresses of various global constants. I tried to use a  
`switch` instruction but I encountered several problems.
The "ideal switch" I'd like to have would look
2017 May 16
2
[IR question] Switching on pointers
Thanks everyone for your answers.
Mats, my goal is do an alternate implementation of the subtyping test  
in the Pony compiler. I'll try to keep the explanation short to avoid  
cluttering the mail with irrelevant information.
Every object in Pony has a type descriptor, which is used in the  
subtyping test to determine the real type of an object. The current  
algorithm is suboptimal and
2006 Dec 07
2
Problem saving parent and children using belongs_to, class_name, and foreign_key
Hi, I have a real simple association setup here that''s just trying to:
- Create a new PayjunctionOrder
- Create some LineItem objects and assign them to the PayjunctionOrder
- Save everything
I''m using Rails Edge.
----
class PayjunctionOrder < ActiveRecord::Base
  has_many :line_items
end
------------------
----
class LineItem < ActiveRecord::Base
  belongs_to :order,
 
2012 Oct 15
6
centos 5 and php53
so whats the scoop on PHP53 for CentOS 5?
I have a long running webserver, runs a bunch of mostly php+postgresql 
stuff, mostly hobby sites (clubs and local scout troops and such).   has 
latest updates to php 5.2.10-xx  but I want to install something thats 
insisting on php53.   If I try and yum install php53, it says it 
conflicts with php-5.2.10 ...
ok, do I remove the old PHP and install