similar to: has_one, the = operator and validates_associated

Displaying 20 results from an estimated 6000 matches similar to: "has_one, the = operator and validates_associated"

2006 Aug 19
1
Re: validates_associated
On 8/19/06, Alastair Moore <alastair-mb+lb5rSoAr10XsdtD+oqA@public.gmane.org> wrote: > > Hello all, > > Having a bit of a problem with validates_associated. I assume I''m missing > something out but basically got these two models - > > class Seller < User > > has_one :profile, :foreign_key => ''user_id'', :dependent => :destroy
2006 Mar 18
1
has_many and validates_associated
By trial and error I seem to arrive to the conclusion that 1. Validation recurses through has_many by default and a root save! call raises an excepcion if some child no matter how nested is fails validation 2. Validation does not recurse through has_one by default and you can change this with validates_associated, in which case exceptions behave like above
2003 Sep 25
1
apply on a 4D array
I am trying to multiply a 3D array of 4x4x4 by the 4 3D arrays of a 4D array with dimensions 4x4x4x4 (the last dimension being the one that I want to split by). (4x4x4 array) > hiaAry , , a1 i1 i2 i3 i4 h1 9.5936098 6.001040 0.08772 0.3138600 h2 1.2003500 1.454570 2.79248 0.0000000 h3 0.1346500 0.201220 0.39256 0.5464000 h4 0.0109000 0.012270 0.16417 0.2766900 ,
2008 Jun 29
2
How to write test about validates_associated
Here is my model: class Account < ActiveRecord::Base has_many :users, :dependent => :destroy has_many :bus belongs_to :currency has_many :mylogs, :dependent => :destroy has_many :batchuserdefines, :dependent => :destroy has_many :materialuserdefines, :dependent => :destroy has_many :materials has_many :inventories has_many :batchs has_many :courses has_many
2013 Sep 19
3
lattice: double y - problem changing axis color after doubleYScale
Hi, I have had some troubles using doubleYScale. No matter what I try, I cant manage to change the color of the y-axis in the end. I have to produce a black and white plot. There is also something I do not understand regarding fontfamilyj="serif" when using it in: strip=strip.custom() Maybe someone has a better idea for defining which line and dots belong to which y-axis when not using
2007 Jul 15
1
NNET re-building the model
Hello, I've been working with "nnet" and now I'd like to use the weigths, from the fitted model, to iterpret some of variables impornatce. I used the following command: mts <- nnet(y=Y,x=X,size =4, rang = 0.1, decay = 5e-4, maxit = 5000,linout=TRUE) X is (m x n) Y is (m x 1) And then I get the coeficients by: Wts<-coef(mts) b->h1 i1->h1
2006 Aug 16
2
File download logging
Is there any way of determining whether a file has been successfully downloaded by a user or to put it another way, whether a dowload was interrupted? -- Posted via http://www.ruby-forum.com/.
2018 Mar 26
2
murmurhash3 test failures on big-endian systems
Hi Aki, On 15:55 Mon 26 Mar , Aki Tuomi wrote: > On 26.03.2018 15:49, Apollon Oikonomopoulos wrote: > > Hi, > > > > The dovecot 2.3.0.1 Debian package currently fails to build on all > > big-endian architectures[1], due to murmurhash3 tests failing. The > > relevant output from e.g. s390x is: > > > > test-murmurhash3.c:22: Assert(#8) failed:
2006 Aug 11
5
actionmailler corrupting emails
Hi All, I have a problem with actionmailer corrupting my html emails. It is adding the character ''3D'' before any quotes (single or double) in my source and smattering ''='' characters throughout as well. Very strange. Here''s an example from one of the emails: ________________ <body> <div id=3D''wrapper''> <div
2008 May 28
15
Help with output
I am having problems trying to get the output to work in an application I have. Here is the example THIS GIVES ME THE CORRECT VALUES <!-- ######## Flooring ######### --> <% if(params[:flooring]) %> <tr><td colspan="4"><h2>Flooring</h2></td></tr> <% for company in @companies
2006 Apr 01
10
You have a nil object when you didn''t expect it!
Hi, I am creating a blog to learn ruby on rails. I have 2 different views/models/controllers, 1 called post and 1 called comments. How do i link a post from the views/post directory to the comments that belong to the post in the views/comment directory. This is the code in the post/show.rhtml <%= render :partial => "post", :object => @post %> <%= link_to
2006 Jan 11
7
Create a relationship with 2 or more tables on 1 insert
userstable: |id|name|password| userdetailstable: |id|col1|col2|col3|user_id| this is my code: [code] def create @user = User.new(@params[''user'']) @userdetail = Userdetail.new(@params[''userdetail'']) if @user.save and @userdetail.save flash[:notice] = "Save succeeded..." redirect_to :action => ''list''
2011 Jan 25
0
[LLVMdev] LLVM targeting HLLs
David Given <dg at cowlark.com> writes: > The obvious place to start on this is the C backend, except in these 2.8 > days the C backend is so hedged about with caveats I'm rather wary of > basing anything on it. I also recall seeing comments here that it's due > for a rewrite from scratch, and that various people were looking into > it. Can anyone go into more detail
2008 Mar 12
3
undefined method `each' for #<Usrecart:0x46d1678>
I have the an error such as undefined method ''each'' pls can any one find the error from the code given below <center><%=@b%></center> <center><h2>WELCOME IN YOUR PROFILE</h2> <%@usercart=Usrecart.find_by_user_id(@b)%> <%if @usercart.blank?%> <br> <br> <br> <br> <h2>THERE IS NO
2006 Mar 21
1
Getting polygons from contiguous grid cells having same value in sp
I have been using the sp package to deal with gridded data. I would like to know how to extract the vertices (x,y) of polygons that outline areas of like-valued cells in a grid. Here is a simple 3x3 grid: 2 2 1 1 2 1 1 1 3 x <- c(1,1,1,2,2,2,3,3,3) # define a 3 x 3 array of points y <- c(1,2,3,1,2,3,1,2,3) h <- SpatialPoints(cbind(x,y)) # make these an sp object of the points
2007 May 01
3
Links in Search Results
I am using a helper method to generate my search result listings: def search_result_name(result) case result when Term "<h2>#{result.title}</h2> <small>Filed under: <strong>Terms</strong></small>" when Article "<h2>#{result.title}</h2> <small>Filed under:
2012 Apr 18
2
RoR - Search Forms with Checkboxes, display appropriate results
I have a form that allows me to search a hotel by city or name and by rating through radio buttons. It all works. However, my hotel model has_one :facility, this facility model is composed by several boolean fields (for example, roomservice:boolean restaurant:boolean and so on) The question is, I want to add checkbox fields for each facility I have and in the search form, when the user selects
2010 Dec 07
4
Creating binary variable depending on strings of two dataframes
Hi, consider the following two dataframes: x1=c("232","3454","3455","342","13") x2=c("1","1","1","0","0") data1=data.frame(x1,x2) y1=c("232","232","3454","3454","3455","342","13","13","13","13")
2012 Sep 30
2
[LLVMdev] Letter-spacing in Sphinx CSS?
On Sat, Sep 29, 2012 at 12:29 PM, Sean Silva <silvas at purdue.edu> wrote: > Looking through the history with git, it looks like it was just > grandfathered in from the original template that the current template > is based off of. I don't think that it is going to hurt to remove it. > > Also, another problem with the current CSS is that some of the > different heading
2012 Sep 30
0
[LLVMdev] Letter-spacing in Sphinx CSS?
Sean and Michael, Thank you for looking at this. I removed letter-spacing in r164921. The h2/h3 issue could be resolved by making the h2 font slightly bigger. Or we could try to copy Wikipedia's approach by using different formatting for different levels (for example, we could remove the background rectangle from h3 and lower, but instead make them bold). Dmitri --