Displaying 20 results from an estimated 900 matches similar to: "Newb question about facade columns"
2007 Jun 22
2
problem with AR and 'virtual' multiparameter attributes.
Hello,
I have a model which I would like to have a ''virtual'' date column.
This column wouldn''t exist in the database, but would exist for
validation, etc. The data would be provided in the form of a
date_select in the view. This produces a multiparameter attribute. My
problem is that the ''execute_callstack_for_multiparameter_attributes''
method in
2006 Aug 19
5
Form helpers don''t work with facade columns?
Hello all,
I''ve been trying to use a facade column but I notice that the form
helpers don''t seem to respect the facade.
In the following example I''m trying to story the prices as Integer
values but present them to the user as decimals.
class Product < ActiveRecord::Base
def price=(new_price)
write_attribute(:price, Float(new_price)*100)
end
def price
2007 Nov 02
1
1 error(s) on assignment of multiparameter attributes - Very Strange
Hello...
Well, I post this one without too much hope that someone will be able
to give me an answer, because it is strange.
I have a time select field, the field on the database is of type time
only.
When creating a document, as long as the time is not greater than
14:00, then it saves as 00:00, but if the time is greater than 14:00
and less than 22:00 then it throws this error:
1 error(s) on
2007 May 12
4
help, 1 error(s) on assignment of multiparameter attributes
Hi everyone!
I just started learning Ruby on Rails about a week ago for a school
project, and can''t seem to find a solution for something.
I have this inside the form inside of edit_albums.rhtml:
<%= start_form_tag :action=>''proccess_edit_album'', :id=>@album.id %>
....
Release Date: <%= datetime_select(:album, :release_date, :start_year
=> 1960)
2006 Mar 03
13
Listing help
Hi,
I''ve created a Rails application and am having a problem listing by a
particular category in an associated table. I followed the instructions
found at the O''Reilly tutorial
(http://www.onlamp.com/pub/a/onlamp/2005/03/03/rails.html?page=3) but have
not had success. Can anyone please outline a better set of instructions
than in the "Showing Recipes in a
2008 Jul 04
4
select_datetime // datetime_select
Hi I have 2 question for you guys,
1. Which is the difference between this two methods? (select_datetime,
datetime_select)
2. How I assign the selected date-time values, to an specific variable
or array using select_datetime
I know do it using datetime_select(''object'',''method'')
I aprecciate your attention.
Thanks
PD: Sorry about my english.
2006 Aug 01
0
Validation of facade columns
I''m having difficulty understanding how to make validation of facade
columns consistent with validation of other active record columns. To
illustrate this, I''m going to extend the facade column example
discussed on pp. 284-5 of AWDR. Let''s say that there is a "rectangles"
table that has width and height columns. For some unknown reason,
width is stored in
2006 Jun 08
5
AM/PM select
I have a customer that has a request that the select_datetime fields
have AM/PM selectors instead of 24 hour time.
The rails time and datetime selects seem to only support 24 hour time.
I can''t seem to find any information on this. i was wondering if
there is already a solution out there, or will i have to roll my own?
Sean Wolfe
master nerd of
i heart squares, inc.
3711 N.
2006 Jan 30
4
multiparameter assignment
I''m trying to figure out the rails why to break a single database field
out into multiple fields on a form, very similar to how rails does with
dates. How can I create my own object that mirrors the date objects
behaviur in how it accepts the multiparameter assignment from the form.
Example:
A phone number field (to force formating on the user) could be broken
into 3 form fields,
2006 May 22
2
Recommended SIP phones?
I am dying here with linphone (not sure if it is crap software or just me
being an idiot) but out of the box debian installations of two linphones fail
with a "Got SIP response 415 "Unsupported Media Type" back from 192.168.1.3"
Can anybody recommend a particular SIP soft phone that broadly satisfies the
following criteria?
1. Run on linux.
2. Simple to use and setup.
3. Is
2006 Jan 25
16
Slideshow beta
Ok,
I finally got the slideshow code to a state worth showing it
off. The site is a very rough cut of a site I''m building for my wife''s
photography, so ignore the unfinished design for now :)
http://rachel.kathihill.com/
To see the ajax version, go to:
http://rachel.kathihill.com/?ajax=1
To randomize the order the images show:
http://rachel.kathihill.com/?random=1
To change
2005 Apr 27
2
noob question: rhtml new/edit views and the date functionality
Hello All,
I''ve been playing with Rails - did the recipe/category sample from
onLamp.com - fairly straight forward - even got it working against
postgres.
Anyway, I''ve been appling rails to a small test project and I can''t
seem to get the syntax down or find a sample of how to use the date
control on a custom new/edit view. The CRUD (is that right?) that
automatically
2006 Jun 01
2
Hiding an attribute
I am using a smallint database column to store several boolean flags.
The flags are accessible thru facade column accessors. I''d like to
hide the database column so all access is thru the facade accessors.
How do I do it?
TIA,
Jeffrey
2009 Jun 09
6
[LLVMdev] Regular Expressions
On Tuesday 09 June 2009 04:35, Török Edwin wrote:
> On 2009-06-09 12:27, Howard Su wrote:
> > This change break the MSVC build since no regex by default in Windows
> > MSVC platform.
>
> Perhaps we should add a regex implementation to lib/System?
That's potentially a lot of work. I started looking at it and it would
involve hiding the OpenBSD library under some other
2006 Aug 14
2
(no subject)
I have the following code that generates a rhtml page,
<%= start_form_tag :action => ''create'' %>
<%= render :partial => ''form'' %>
<%= submit_tag "Create" %>
<%= end_form_tag %>
<%= link_to ''Back'', :action => ''list'' %>
...I am trying to put a "Browse" button to
2009 Nov 13
2
help sample from large dataset - misleading error?
Hi All,
I want to take a simple random sample from a large dataset, gly, but I'm
getting an error message. Any help?
dim(gly)
[1] 112371 37
> s1 <- sample(gly,100)
Error in `[.data.frame`(x, .Internal(sample(length(x), size, replace, :
cannot take a sample larger than the population when 'replace = FALSE'
Thanks,
Rachel
[[alternative HTML version
2008 Aug 01
5
viewing data in something similar to 'R Data Editor'
Hi,
I would like to view matrices I am working with in a clean, easy to read,
separate window.
A friend showed me how to do something like I want with edit(). I can view
the matrix in the 'R Data Editor':
For a sample matrix:
> mat=matrix(1:15,ncol=3)
> mat
[,1] [,2] [,3]
[1,] 1 6 11
[2,] 2 7 12
[3,] 3 8 13
[4,] 4 9 14
[5,] 5 10 15
2006 Jun 04
2
Can anyone help?
Quick question please....A user logs into windowsXP and tries to create a folder/document and the ownership on the new file/folder defaults to nobody:nobody. I have the user set up in samba on the IRIX machine. All other users have no problem. Anyone have any suggestions?
Thanks
Rachel
2010 Aug 18
6
Once I added this HABTM, one of my 'through' relationships, on a non-habtm model, seems to have broke?
I''m a rails newb and have been Googling about this, but I''m still stumped.
Not showing everything here, but basically it should be a pretty common
setup so I''m sure others know what I''m doing wrong.
- A meter can belong to many meter_groups
- A meter_group can have many meters.
- A user can ''subscribe'' to viewing a meter_group (Subscription)
2009 Jul 09
3
Stratified data summaries
Hi All,
I'm trying to automate a data summary using summary or describe from the
HMisc package. I want to stratify my data set by patient_type. I was
hoping to do something like:
Describe(myDataFrame ~ patient_type)
I can create data subsets and run the describe function one at a time,
but there's got to be a better way. Any suggestions?
Rachel
[[alternative HTML