similar to: Inserting NULL values into PostgreSQL from Rails

Displaying 20 results from an estimated 2000 matches similar to: "Inserting NULL values into PostgreSQL from Rails"

2006 Jan 17
6
Rails Best Practices Page
Hey, I have been progressively learning more and more rails each day (from both a current project, reading the agile book, and this list). Does anybody think it would be beneficial to have kind of like a rails "Best Practices" page that lists some of the better ways of handling certain functions of rails (that are common in most apps) that are both more elegant, and efficient. For
2006 Jan 31
2
Need advice on RoR app design
Fellow Railers, Is there anything, anywhere, that I can read that discusses overall RoR app design? I have the Agile RoR book, which is great for learning the details of RoR, but unfortunately doesn''t cover the overall issue of creating a large, complex RoR app. My staff and I are still in the process of getting up to speed on Ruby and RoR, but we also need to begin thinking about
2006 Jan 30
1
auto_complete_with_index_for
I have a crude hack to allow auto_complete to work with indexed text fields. I needed it for a timecard entry form with an arbtirary number of records which can be added/changed/delete willy-nilly by users. One of the fields is a perfect candidate for autocomplete since it references a database object with a large number of choices and long descriptions. Using a select list is extremely ugly in
2006 Feb 01
4
Locking out users from certain records/urls
I am using the standard login controller that ships with RoR to authenticate users in my application. In my app, Users belong to Clients, Clients have Projects that users are assigned to (stored in a stakeholder table with user_id and project_id columns) , then each project has a bunch of folders and assets (file uploads). So currently I have urls that look like /project/show/12 etc. I want
2006 Jan 31
19
Best Practices: Escaping text on input or output?
In web applications that have user generated content, it is clearly necessary to provide some ability to ''escape'' user generated text to avoid SQL injection, XSS, and other nasty attacks. The existing dogma on this point seems to favor escaping text as it comes out of the database, rather than doing it on the way in. I''m not sure that I understand the logic behind
2006 Jan 19
5
TIP: Using field_error_proc to add style attributes to form elements
I just put this up on the wiki, and thought I''d share in case it''s useful to anyone else. This is handy if you don?t want to wrap your input elements inside a div when an error occurs, but instead want to add some sort of CSS style to fields with errors: ActionView::Base.field_error_proc = Proc.new do |html_tag, instance| msg = instance.error_message error_style =
2006 Jan 02
19
AR: How to store and restore in YML.
Hello- I have a database with entries that are segmented by customers. I would like to be able to store / delete / restore a particular customer''s information. I will need to rebuild the rows on restore and also rebuild the associations for the different tables. For example, customer { id name } companies { id customer_id (belongs_to) name } contacts { id
2006 Jun 26
2
text_field weirdness?
I''m storying amounts of money in my database as cents. So I have custom accessors in my model, for example def actual_amount read_attribute("actual_amount").to_f / 100.0 end But when I use <%= text_field ''item'', ''actual_amount'' %> I get, for example, "3600" instead of "36.00". If I ignore the helper, and
2006 Jan 17
2
multiple GLMs with lmList in lme4
I'd like to fit a GLM to each of a number of subsets of some data. The `family' argument to `lmList' (in lme4) has given me cause for optimism, but so far I've only been able to achieve linear model fits. For example > df <- data.frame(gp = gp.temp <- factor(rep(1:3, each = 100)), x = x.temp <- rnorm(300), y = rpois(300, exp((-1:1)[gp.temp] + x.temp))) Then a call to
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
2005 May 24
3
Wine on Macs ?
Now that MacOS is Unix-based, can Wine be run on them ? -- Andrew You can be the captain I will draw the chart Sailing into destiny Closer to the heart Closer to the Heart by Rush (A Farewell to Kings, 1977) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2010 Apr 13
1
formatR: farewell to ugly R code
This is an announcement of the release of an R package 'formatR', which can help us format our R code to make it more human-readable. If you have ugly (I mean unformatted) R code like this: ?# rotation of the word "Animation" # in a loop; change the angle and color # step by step for (i in 1:360) { ? # redraw the plot again and again
2010 Apr 13
1
formatR: farewell to ugly R code
This is an announcement of the release of an R package 'formatR', which can help us format our R code to make it more human-readable. If you have ugly (I mean unformatted) R code like this: ?# rotation of the word "Animation" # in a loop; change the angle and color # step by step for (i in 1:360) { ? # redraw the plot again and again
2008 Mar 19
3
[LLVMdev] Proposal for GSoC project for improving llvm-test testsuite
Am Mittwoch, den 19.03.2008, 14:49 +0100 schrieb Holger Schurig: > > Just my two cents. From time to time I'm testing LLVM via > > compiling & running such big beasts as Qt and Mozilla. Also, > > at 2.0 time I tried to compile & test bunch of software from > > KDE and many others. > > I tried to compile the 3D game engine "darkplaces" with
2008 Jul 02
0
before_type_case broken?
Hey, I''ve noticed that I seem unable to get a _before_type_cast value for dates in 2.1. Specifically, if I assign a date string to a date attribute, and then call attribute_before_type_cast I get a TimeWithZone instead of a String: model.start_date = "2001/01/02" model.start_date.class = ActiveSupport::TimeWithZone model.start_date_before_type_cast.class =
2008 Mar 19
0
[LLVMdev] Proposal for GSoC project for improving llvm-test testsuite
> "Didn't work" means... what? Compilation failed? Program doesn't work? > Either way: what mesages do you get? The graphical screen was just blank. darkplaces emits some log messages as usual. But step by step... Used LLVM-GCC ------------- The used llvm-gcc, when run with "llmv-gcc --version" shows "llvm-gcc (GCC) 4.2.1 (Based on Apple Inc. build 5546)
2002 Sep 24
3
2.5.5-1 rsync hangs
On Mon, Sep 23, 2002 at 01:06:22PM -0700, Sudheer Tumuluru wrote: > > I am having the same problem with rsync 2.5.5-1. I am > trying to rsync a couple of short text files between a linux server and > Win2k Professional boxes with cygwin. About 20% of the time, rsync freezes > at the end of the transfer, and I can't kill the rsync process in > cygwin even if I give it a 9
2012 Dec 06
2
Bye Bye, Observers
Observers will be no more as of Rails 4, farewell, never been much of a fan. However, I''m using it in one of my gems which enables model attributes for use with a WYSIWYM editor. The resulting markup is persisted, but in order to use it in a view, it has to be nokogiried in a helper which fragment caches the result. This cache has to be zapped once the model instance is either
2000 Feb 29
1
No subject
Does anyone know of any comprehensive literature (like a book, collection of articles, etc.) that walk thorugh example of ARIMA modeling with the ts package of R? Genarlly if you've just started to learn the R-language and are all week long with ARIMA, what is a fast-pace source that you would recommend (to a beginner) ? Thank you, Krasi
2005 Apr 30
2
Using real windows drive
Newbie of course, and having trouble finding answers in the plethora of documents and forums. I can't seem to set up my config correctly so that my windows drives and cdrom are properly recognized by winefile. I put lines in for C - fake windows D- real windows E-cdrom P-Partition that has my windows based program files(this drive segfaults 139 depending on which way I go into it)