Displaying 20 results from an estimated 110 matches similar to: "Getting an error on options_groups_from_collection_for_select"
2006 Jun 16
0
Getting error on a group select
Hi,
I''m very new with Ruby and Rails. I have read Agile Web Development
with Rails and was trying to create a grouped selection list by
following his example on page 359.
My helper looks like this:
module LoginHelper
AssocOption = Struct.new(:code_name, :display_name)
class AssocType
attr_reader :type_name, :options
def initialize(name)
@type_name = name
2008 Dec 23
1
aggregate / tranpose data
Dear R-Users,
Suppose I have data in the following format:
CODE_NAME ZIP_CODE
John 12345
John 23456
John 34567
Jane 13242
Jane 22123
I want to transpose / convert it into:
CODE_NAME ZIP_CODE
John 12345,23456,34567
Jane 13242,22123
Any idea/pointer is appreciated.
2010 Aug 19
1
Composite primary keys and :joins=>
I have a legacy db with the following simplified structure:
Table-A:
type_key, code_key, name, ... # PKs are type_key and code_key,
there is no id col and I cannot alter this db
Table-B: # each row has only the code as a foreign_key, the type_key
is hard-coded to "FOOKEY"
an_id, code, ...
Models:
class TableB < AR::Base
set_table_name ''table_b''
2014 May 19
0
Can ActiveRecord::Base.connection.schema_search_path be set per process?
I am building an app that every company has it own private
schema(Postgresql).
For every requisition, I set the Postgres search path in a before_action
like this:
ActiveRecord::Base.connection.schema_search_path = 'company_id, public'
If I have multiple Unicorn workers, and one worker 'A' set the path, while
another work 'B' set the path before worker A has finish, I
2009 Jan 21
3
Nested serialization with to_json and to_xml with array and hash element
Title: Nested serialization with to_json and to_xml with array and
hash element
class Person < ActiveRecord::Base
has_one :address
has_one :job
def office()
return "Executive_Suite"
end
end
class Address < ActiveRecord::Base
belongs_to :person
end
class Job < ActiveRecord::Base
belongs_to :person
has_one :paygrade
def Title
return "Engineer"
end
end
2006 Feb 02
0
proposed bugfix/patch: ActiveRecord cross-module associations
Hi,
I''m still test driving the improved support for module namespaces in
rails and I''ve hit a problem with associations between AR classes in
modules and AR classes in the root namespace.
The long and short of it is I want to be able to say:
Foo::Bar.belongs_to :wibble, :class_name => "::Wibble"
If you don''t try to prefix ''Wibble''
2007 Nov 07
5
Unexplainable failure...at least for me
I have an address model with country_id and province_id fields
There is also a full_address method that returns an address that is in a
format that the google maps api will be able to return a long-lat
coords.
Within the full_address method there is a call to obtain the
province/state and country name.
---------
def full_address
...
full_address = [city, self.province.name,
2007 Feb 12
0
[862] trunk/wxruby2/swig/fixmodule.rb: Fix regression from upgrading to SWIG 1.3.31; cure lots of MSW crashes
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding:
2006 Jan 23
3
problem with a selfmade helper method
Hi all,
i tried to set up the helper method "grouped_programs_selector" in
application_helpers.rb. Since i dont have a deep understanding of Ruby
itself, I pretty much copied the Grouped Selection List (Chapter 17, pp.
259, 260) example from Dave & David''s Book.
The optiongroups are properly created by my method, but there are no options
inside. Maybe you can debug this
2008 Jul 30
0
[LLVMdev] llvm-gcc fortran bootstrap broken
On Wednesday 30 July 2008 18:13:27 Duncan Sands wrote:
> On x86-64 linux, in stage 2, I get:
>
> c++ -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wmissing-format-attribute -fno-common -DHAVE_CONFIG_H -o f951 \
> fortran/arith.o
2010 Aug 13
0
some helpful tips on using RODBC
Hey everyone,
I don't have a question. Instead some helpful advice with things I've
learned from trying to connect 'R' to databases using RODBC.
ROBDC is a very handy tool that, once you have everything fixed up
nicely, is a great way to have scripts run fairly autonomously, safe in the
knowledge that data isn't accidentally messed up. But I was fairly ignorant
2006 Mar 16
2
[LLVMdev] Re: Re: Re: Re: Re: New GCC4-based C/C++/ObjC front-end for LLVM
Evan Cheng wrote:
> Hi,
>
> Here is the follow on patch for this problem. Please apply this from
> the top of the tree and rebuild.
With the patch from Chris and then the patch from you combined, the previous
error disappeared, but I get another error, reduced to this:
./cc1 -fpreprocessed libgcc2.i -quiet -dumpbase libgcc2.c -mtune=pentiumpro
-auxbase-strip libgcc/./_clz.o -g -O2
2006 Dec 15
1
Ferret debugging
Is there any way to debug processes of creating/updating of index and
data retrieval?
I use ferret (0.10.13) and acts_as_ferret plugin, and it seems that
index is being updated - field ''state_or_province_or_region'' has value
''ON'':
ferret_create/update: Entity : 1
creating doc for class: Entity, id: 1
Adding field description with value ''Sed metus
2015 Dec 23
0
[ANNOUNCE] xf86-input-libinput 0.16.0
xf86-input-libinput 0.16 is now available. This release fixes a
long-standing issue with mixed devices that expose a pointer and a keyboard
interface at the same time. X requires a strict separation between pointers
and keyboards, these devices were usually initialized as pointers and
exhibited some keyboard functionality issues (e.g. XKB layouts didn't get
applied correctly). With this
2001 Nov 14
0
RODBC: Minor problem, I hope.
Sorry for the numerous posts, I found that an old (~ June) post had the same
title and confused me (and the list server) greatly (and made it hard to get
this as a new thread).
Anyway...
I'm trying to get the RODBC package to work with a MS Sql database
(Wonderware's InSQL). I'm able to connect to the database using the
following:
version
_
2011 Apr 16
0
adding HABTM association while creating a record
Hello Experts,
I have a HABTM association as followed:
class Account < ActiveRecord::Base
has_and_belongs_to_many :user
end
class User < ActiveRecord::Base
has_and_belongs_to_many :type
has_and_belongs_to_many :account
end
class Type < ActiveRecord::Base
has_and_belongs_to_many :user
end
I have the following query;
I Have a parent user who is creating another user under its
2010 Nov 25
1
RODBC
Hi,
I am running the RODBC examples form the help guide. I am trying to
UPDATE a table in an Access data base but I am having an error.
library(RODBC)
library(termstrc)
path = getwd()
setwd(getwd())
dbName = "data.mdb"
pathdbname = paste(path,"/",dbName,sep="")
accesChannel = odbcConnectAccess(pathdbname, uid = "", pwd = "")
2005 Aug 17
1
RODBC and sqlColumns
I have a Postgres database that I am connecting to with the Postgres
ODBC driver on Windows XP in R 2.1.0. In the database is a database
with two schemas (public and X). With RODBC (1.1-4) , I can connect to
the database and get the tables with sqlTables(db). I can query tables
in the schema with sqlQuery("SELECT * FROM X.test"). However, I can't
get the columns in table X.test
2019 Apr 07
1
[Bug 1333] New: 1.8.2: build fails with gcc 9
https://bugzilla.netfilter.org/show_bug.cgi?id=1333
Bug ID: 1333
Summary: 1.8.2: build fails with gcc 9
Product: iptables
Version: unspecified
Hardware: x86_64
OS: All
Status: NEW
Severity: enhancement
Priority: P5
Component: iptables
Assignee: netfilter-buglog at
2005 Nov 08
2
crash in PHP4 examples
Hi,
I have been experimenting with simpleindex.php in the php4 examples.
However, the command seems to crash on exit:
$ php simpleindex.php h < simpleindex.php
Segmentation fault
I ran it through gdb to get a stack trace (see below). It looks to me as
if the WritableDatabase may be getting deleted twice. Can this be fixed,
or alternatively is there any work around?
I'd have a look at