Displaying 20 results from an estimated 800 matches similar to: "actionmailer / @recipeints"
2006 Jul 12
5
validates_peresence_of
Is there an expert validater that can point me in the right direction?
I''ve looked for extended documentation on ''validates_presence_of'' but i
can''t seem to find any.
I''m trying to make sure that i don''t enter a nil object in my database,
so i''ve added validate_presence_of to my Record Model.
i.e. -->
class Record <
2006 Aug 01
3
Commenting out Code
Does any one know how to comment out code in a controller (.rb file)
Thanks,
Yng
--
Posted via http://www.ruby-forum.com/.
2006 Jul 11
6
@record.each do |record|
I''m trying to ''destroy'' a particular record of a table
>From the controller side, i''ve found a list of possible records that i
want deleted.
ie. @chart = Chart.find(:all, :conditions => ["record_id = ?",
param[''id''] ]
''id'' is passed into the controller and @chart is all the possible
records that have
2006 Sep 07
3
pairwise.t.test vs. t. test
Hi,
If I set the p.adjust="none", does it meant that the output p values from the pairwise.t.test will be the same as those from individual t.tests (set var.equal=T, alternative="t")?
I actually got different p values from the two tests. See below. Is it supposed to be this way?
Thanks
Johnny
> x
[1] 61.6 52.7 61.3 65.2 62.8 63.7 64.8 58.7 44.9 57.0 64.3 55.1 50.0 41.0
2006 Jul 10
3
finding particular record
Hi,
I''m looking for a particular record from a view called ''charts''. The
view ''charts'' joins data from a table ''record'' and a table ''owners''.
I''m trying to pull up data from ''charts'' that lists certain data from
''record''
ie. I know i need record.id = 5. Is there a
2006 Jul 10
4
find()
Can some1 help me on syntax with the find() function.
I''m trying to pull up a table record, called chart, that has a
particular field specified.
ie
chart has a field called record_id, which i know. How can i find the
record that contains chart.record_id.
something like chart = Chart.find(:conditions => "record_id = :id")
this gives me an error. I''m passing
2006 Jul 13
1
error_messages_for
I can''t seem to figure out how to validate a few fields some1 please
help me out
model---------
class Record < ActiveRecord::Base
validates_presence_of :sw, :flex
end
controller------------
class RecordController < A;;icationController
def new
@record = Rrecord.new
@product = Product.find(params[''product_id''])
end
def create
2008 Aug 27
11
find_by_sql and xml_serializer problems
Hi,
I''m doing a find_by_sql and am getting an odd error when trying to
render the result to xml.
The find is:
children_list = find_by_sql("SELECT components.componentid,
components.logicalname, versions.level, versions.branch,
versions.sequence FROM components, versions where
components.componentid = ''" + component_id + "''" + " AND
2013 Jul 21
4
how to use activemodel collection.build for a has_many :through association
Hi all,
In my controller I am doing the following to populate a nested form for a
has_many through association:
def new
@specification = Specification.new
Component.find_each.each do |component|
@specification.component_specifications.build(:component_id =>
component.id)
end
The idea being whenever someone creates or edits a form, it will be
populated with all
2008 Apr 09
3
help with model relationship for Product/Bill of Materials
I am struggling to find the best way to set up relationships to
achieve this so that it fits the rails idioms.
I have a table of products and I want to be able to create a bill of
materials for a product..
So a product can either be a single item, or a package consisting of
several other products.
I have created a table:
----
class BomItem < ActiveRecord::Base
belongs_to :product
2006 Apr 19
2
Using Reflections to find out ActiveRecord class association
I want to find out what are the associations with another active record
class. So If my class is as below:
Class Component < ActiveRecord::Base
has_many :branches
end
class Branch < ActiveRecord::Base
belongs_to :component
end
and then I do
Component.reflections[:branches].active_record
I would expect that to be Branch but it is in fact Component.
The inspection of
2006 Mar 24
1
Multiple table relationships
Hello,
I''m just starting out with some Rails development and have the following
table structure. I understand how to do a two table has many join but I
actually need to relate a third table. Here is my structure:
components
id
name
updated_at
elements
id
name
updated_at
element_types
id
name
updated_at
components_elements
component_id
element_id
2012 Nov 05
2
[PATCH] x86/ACPI: invalidate BGRT
Since the image pointed to may (and generally will) live in boot
services memory (which we add to the global memory pool long before
ACPI tables get looked at), we should prevent Dom0 from trying to
retrieve the image data.
The alternatives would be to
- not add boot services memory to the global pool at all, or
- defer adding boot services memory until Dom0 indicates it is safe to
do so, or
-
2014 Dec 15
6
rsync output under CentOS 6
Hello Elias,
Monday, December 15, 2014, 4:13:20 PM, you wrote:
EP> Sounds like it might be differences in precision of the timestamp.
Could be, thoght the NAS box has the sending system as it's NTP server so
their times should be in sync.
EP> Check out the `--modify-window` option.
Doesn't seem to stop all the folders being listed even though nothing is
transferred.
2014 Dec 15
2
rsync output under CentOS 6
Hello Les,
Sunday, December 14, 2014, 7:18:09 PM, you wrote:
LM> Folders should only be listed if timestamps or permissions are different.
Further experimentation shows this to be the case IF the destination is
another local drive.
Unfortunately the required destination is a CIFS share, which might change
things.
--
Best regards,
Niamh mailto:niamh at
2006 May 08
2
Noob Question - Variable Scope
I feel awful asking such a basic question, but here it goes....
I have a controller, "NewsController".
The user enters and the "list" action is called and I populate an
instance variable "@news" which contains all the elements I''d like to
display using a form.
The user then changes something and the "update" action is called.
Is
2006 Aug 18
3
DNAT Security Hole?
# shorewall version
3.2.1
SNAT is enabled. Setting up DNAT to do port forwarding -- this example
looked exactly like what I wanted:
(FAQ 1c) From the internet, I want to connect to port 1022 on my firewall
and have the firewall forward the connection to port 22 on local system
192.168.1.3. How do I do that?
In /etc/shorewall/rules:
#ACTION SOURCE DEST PROTO DEST PORT
2017 Aug 22
2
unexpected delivery location
Hi,
We're running dovecot 2.2.13, virtual users, with postfix. We have an
olddomain and a new domainname. To 'translate' *@olddomain into
*@newdomain, I have configured:
> cat /etc/postfix/canonical
> @olddomain.com @newdomain.com
While this seems to work, lately we have noticed that dovecot
occasionally creates mailboxes for non-existent users, like:
>
2006 Oct 29
3
Best practice - polymorphic or not
Hello I have this scenario (hope it is understandable):
I have a model to support fact messages of different types. This is
sport related and I have currently the following model design.
matchfacts (is the generic table connecting all matchfacts to for
instance a match/game, match has_many matchfacts).
Some matchfact-data is generic, like the time of fact and therefore the
data should be stored
2003 Jun 13
4
Problem/bug report for "bad decrypted len" error in OpenSSH
Hi!
I think lines between 250-252 in file ssh-rsa.c in OpenSSH source code
should be commented ! ! !
REASON:
Using "SecureNetTerm Client" ( http://www.securenetterm.com/ ) with
"SecureKeyAgent" ver. 5.4.2.4 ( Or same is with Putty + SecureKeyAgent ) to
connect to OpenSSH server "OpenSSH ver. 3.6.1" using public key from Smart
Card certificate causes the following