Displaying 20 results from an estimated 300 matches similar to: "What fields_for really for?"
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
2006 Aug 09
0
Two Autocompletes, make first value affect the second
I have two text_field_with_auto_complete
text_field_with_auto_complete :user, :state
text_field_with_auto_complete :user, :suburb
The user fills in the text_field_with autocomplete... but then I want to
filter the results in the suburb with the value they''ve just entered
def auto_complete_for_user_suburb
@suburbs = PostCode.find(:all,
:conditions => ["lower(locality)
2003 Jul 17
1
Recode from 2 variables
I am trying to create a new variable which uses the suburb names if HR
and HRRES are the same but which uses HRRES if they are different. Any
assistance would be appreciated as my brain has just packed up. I'm not
sure I can teach myself anymore new tricks this afternoon.
HR HRRES SUBURB
What I am trying to get
954 Wheatbelt
2006 Mar 17
3
Timestamps casted to nil?
Hi,
for some reason, all timestamp fields with or without time zone in my
Postgres tables seem to be casted to nil. From console:
>> me = User.find(''PS12345'')
=> #<User:0x2379788 @attributes={"mtime"=>"01.03.2006 13:26:32.737166",
"valid"=>"8", "valid_from"=>"01.03.1999 14:09:21 CET",
2006 Aug 16
1
how to update a collection_select from another
I have two collection_select in my list.rhtml:
<%= collection_select (:region, :id, @regionall, :id,
:title,html_options={:onChange => "new
Ajax.Updater(''related_provinces'',''/categories/related_provinces/" +
"?id=''+this[this.selectedIndex].value,
{asynchronous:true, evalScripts:true});"}) %><br>
<%= render :partial =>
2016 Nov 02
0
[PATCH v3 05/15] secboot: remove fixup_hs_desc hook
This hook can be removed if the function writing the HS
descriptor is aware of WPR settings. Let's do that as it allows us to
make the ACR descriptor structure private and save some code.
Signed-off-by: Alexandre Courbot <acourbot at nvidia.com>
---
drm/nouveau/nvkm/subdev/secboot/gm200.c | 95 ++++++++++++++++++++++++---------
drm/nouveau/nvkm/subdev/secboot/gm20b.c | 11 ----
2006 Jul 02
7
How can I intercept attribute calls?
Hi.
I have two types of fields in my database, e.g. "name" and "name_ru".
First one is a user''s name in english and the second one is in russian.
I want to intercept calls like "c.name" and add "_ru" to it if current
language is russian (I have my own Locale class like n Globalize).
So I want such thing:
--
Locale.set("en-US")
c.name
2006 Apr 21
1
select box with multiple rows
I want a select box that displays 5 rows instead of one row and a drop down.
so i figure this should work, but it doesn''t.
<%= collection_select(:constellation, :region_id, @regions, :id, :name,
html_options = {:size => ''5''})%>
I am not quite sure how to use that html_options and googling around I didnt
find anything directly on point.
Any suggestions?
2006 May 31
1
ActiveRecord: When / where to validate data? Tricky question
First of all, thanks for you time. I have kind of a tricky question and
wanted to see what you guys thought.
-------------------------------------------
Lets say I have this:
-------------------------------------------
class Purchase < ActiveRecord::Base
validates_numericality_of :some_number, :only_integer => true
end
-------------------------------------------
Then I do this:
2012 May 03
1
Help with getting values from string
Hi All,
I have a doubt. I used macros and i try to pass a value to a macro by
concatenating a bunch of strings. But it does not seem to work. Please help.
I have written down my code and the error message please tell me how to pass
the value that a string points to. Thanks in advance
#macro defined
2012 Apr 23
2
Overlay Gene Expression on SNP (copy number) data
Hello,
Can anyone please suggest any packages in R that can be used to overlay gene expression data on SNP (affymetrix) copy number ?
Thanks,
Ekta
Senior Research Associate
Bioinformatics Department
Jubilant Biosys Pvt Ltd,
#96, Industrial Suburb, 2nd Stage
Yeshwantpur, Bangalore 560 022
Ph No : +91-80-66628346
The information contained in this electronic message and in any attachments to this
2012 May 04
0
LIMMA decideTests result zero from contrast matrix
Dear All,
I am using the LIMMA package to create 2 contrasts for my data and then calculating the vennCounts of the decideTests from the contrast.fit to be able to create venn Diagrams.
The code works fine but the summary(results) shows zeros for all i.e. no gene were up regulated or downregulated. This is not true for my data since toptable output shows Log fold change greater than > 2.
I am
2006 Apr 10
0
parent - child help (RoR & MySQL)
I''m having some trouble getting a parent-child relationship working.
I''ve got 5 tables, 1 being the main table and 4 being lookup tables for
the main. in the chart below, each of the xxxx_id fields has a
corresponding table. I would like to be able to show just the result of
the relationship. this is also outlined below.
table_example:
[id_of_object] object_id
2006 Jan 19
1
Populating a select field using observe_field
Hi,
I''ve just started toying with Rails and AJAX, so forgive me if this is a
bit of a stupid question. I''m trying to populate a select field when the
value of another select field is changed. Looking through the API doc,
it seems like observe_field is what I need.
In my view I have:
<p><label for="wine_country_id">Country</label><br/>
2011 Aug 22
0
Paperclip nested resources problem
My models:
class Country < ActiveRecord::Base
has_many :regions
has_many :assets, :dependent => :destroy
accepts_nested_attributes_for :assets
end
class Region < ActiveRecord::Base
belongs_to :country
has_many :appartments
has_many :assets, :dependent => :destroy
accepts_nested_attributes_for :assets
end
class Asset < ActiveRecord::Base
belongs_to :region
2002 Nov 18
0
Spark Press Release
...........................................................
SPARK PRESS RELEASE :: One Year Of Interactive IP Video
...........................................................
SPARK CELEBRATES ONE YEAR OF IP VIDEO SERVICE
World's First Totally IP VIDEO Based Service
Indianapolis, Indiana - November 11th, 2002 -
While the telecommunications world heaved and
shrugged under a collapsing
2008 May 11
0
validates_numericality_of and greater_than* doesn't appear to be working
I''m using Rails 2.0.2 and I have been trying to take advantage of the
"validates_numericality_of" with the ":greater_than" option with
something like this:
validates_numericality_of :users, :greater_than => 0, :only_integer =>
true, :allow_nil => true, :message => "The number of allowed users
must be a whole number greater than zero."
But this
2007 May 01
2
Problem validating boolean
Hi
I''ve got a problem validating a boolean and I can''t see what the
problem is. Here''s my model:
class FinanceAgreement < ActiveRecord::Base
belongs_to :asset
validates_presence_of :finance_company
validates_inclusion_of :balance, :in => 0.01..10_000_000
validates_inclusion_of :term, :in => 1..600
validates_numericality_of
2009 Jan 08
4
Problem with disable_with
Hi Group,
I have a registration.html.erb page with the following JavaScript at
the top which I use to validate form fields:
<script type="text/javascript">
<!--
function validate(){
if ((document.myForm.email_projectname.value=="")||
(document.myForm.email_projecttype_id.selectedIndex<1)||
(document.myForm.email_region_id.selectedIndex<1))
{
alert
2009 Mar 14
9
null object pattern
I am trying to create a null object in my application. I would like to
assigned a null user object for anonymous/ mot-logged-in user, i.e. if
session variable has nil data.
In my User model, I have created a subclass like this:
class UnassignedUser < User
def save
false
end
def update
false
end
def username
"Unassigned"
end
def county_id