Displaying 20 results from an estimated 1300 matches similar to: "primary key?"
2006 Jul 26
15
Rails without a primary key
I''ve been trying to use Rails on a database where the biggest
datawarehouse-style table doesn''t have a primary key. It really
doesn''t make sense and just adds extra unnecessary space. I do have,
however, a column that I normally use to search on (IP) that returns
many rows. The table also references several other tables through
rails-friendly foreign keys.
Simple AR
2010 Nov 09
2
Undefined method
I am very new to ROR. (Ruby 1.8.7, rails 2.1.1, rack
0.8.7, mysql 5.1.41)
I has my_app/lib/migration_helpers.rb file:
module MigrationHelpers
def self.foreign_key(from_table, from_column, to_table)
constraint_name = "fk_#{from_table}_#{to_table}"
execute %{alter table #{from_table}
add constraint #{constraint_name}
foreign key (#{from_column})
2009 Jul 02
2
compose_primary_keys
I´m looking for a way to work with compose primary keys.
I alredy know that plugin http://compositekeys.rubyforge.org/
but it doesn´t have examples.
Please help =]
--
Horus Augustus C. C. Lima
Sagarana Tech
Mobile +55(85)8842.4402
Desk +55(85)3304.6530
augustus-b3GZhX+fmr6XmMXjJBpWqg@public.gmane.org
http://www.sagaranatech.com
--~--~---------~--~----~------------~-------~--~----~
You
2008 Jun 10
5
outlook windows problem
hello, client can not connect using outlook.
has any of you noticed this problem.
can not connect with imap or as pop.
i am using a self signed certificate.
2006 Feb 03
3
My associations are coming out nil.
I''ve got a fairly simple system with a table for my Users that
includes a CountryId field which looks up to the CountryId field of my
Country table. What I would like to happen is for my Rails
application, which contains models for both User and Country, to be
able to draw the dropdown list of available countries on the edit
page, like it does in all the tutorials.
My model classes look
2007 Mar 20
2
collection_select - why doesn't it work?
Hi all
I guess this is quite a newbie question, but I''m just stuck here and
don''t know why.
<%= form.collection_select :origin_country, Country.find(:all), :id,
:name %>
gives me a select list with name="member[origin_country]". When
submitting the form the following error is shown:
Country expected, got String
When I try
<%= form.collection_select
2009 Mar 18
3
[LLVMdev] Status of LLVM's atomic intrinsics
Having implemented a GC for HLVM, I am now turning my attention to
implementing a GC that supports parallelism. To do this, I would like to use
atomic instructions as well as mutexes. What is the status of LLVM's atomic
instrinsics (e.g. CAS)? Is anyone using them in real projects?
I realised that an obvious test would be to compile some simple example
programs with llvm-g++ instead of
2005 Mar 08
15
Rails 0.10.1and WEBrick
Doesn''t appear to work with WEBrick. Works find with Apache/FastCGI.
Something wrong in the way Rails is trying to process paths from the
WEBrick server. If I try to send in http://localhost:3000/recipes/new,
WEBrick is interpreting /new as my controller, instead of my action.
2007 Nov 16
3
Route Information
Is there a method to return a hash of the route configuration based on
a path?
For example:
magic_method(''/my_controller/my_action/my_id'')
=>
{:controller => ''my_controller'', :action => ''my_action'', :id =>
''my_id''}
Thanks!
Tom
--~--~---------~--~----~------------~-------~--~----~
You received this message
2010 Mar 26
7
seed data
Hi
I am using seed_fu to seed initial data to tables
(http://github.com/mbleigh/seed-fu) . And in db/fixtures/state.rb
I have values like (I am filling only two data for simplicity)
State.seed_many(:name, :abbr,:fips,:country_id, [
{ :name => "Alberta", :abbr => ''AB'',:fips => ''01'', :country_id =>
2 },
{ :name =>
2006 May 25
1
Question regarding reading arrayvision files in limma
Hi Everyone,
I have been trying to read some Arrayvision files( 2 channel cDNA) and
am having some
problem. My code is :
setwd('C:/work/data/limma/ndd1');
files <- c('ndd1_1.txt','ndd1_2.txt','ndd1_3.txt');
RG=read.maimages(files,"arrayvision",sep="\t");
#Normalisation
MA=normalizeWithinArrays(RG);
#plotPrintTipLoess(MA);
#Fit Linear
2009 Jan 28
3
Apply style in collection_select ?????
Hi to all,
i have this snip i want to apply style to this combo but there is no
effect
help.......
<%= collection_select(:customer,:country_id, @countries,:id, :country,
html_options={ "style" => "width:110px" },:onchange =>
''updateState('''');'',:id =>''country_id'' )%>
Thanks,
--
Posted via
2012 May 28
4
How to load a selection list into the method new of a controller?
Hi friends!
I''m relatively new with Rails and I''m struggling for a long time with this
problem (it should have a pattern solution but until now I didn''t find it):
I have the following models: Institution, City, State and Country.
class Country < ActiveRecord::Base
has_many :states
has_many :cities, :through => :states
end
# == Schema Information
# Table
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,
2009 Mar 09
3
multiple columns primary key
Hi all,
I have two tables:
TABLE 1
A pk - fk (referencesc TABLE 2)
B pk
C pk
D pk
E
F
TABLE 2
A pk
G
H
I
L
I don''t use incremental field (id). I''d like don''t use find_by_sql.
How can I define both models to use correctly find method (with
include)? With only one column primary key I haven''t problems.
I thought two solutions, but I don''t like these
2012 Nov 17
2
Help needed for error in foreign key validation
I have two models bank and country. User should only associate a Bank with
a country id present in the country table and I put validates presence of
country to enforce it but i get error mysql2::Error: Unknown column
''countries.bank_id'' in ''where clause'': SELECT `countries`.* FROM
`countries` WHERE `countries`.`bank_id` = 17 LIMIT 1 when updating the bank
2008 Jun 06
2
maildir file creation problem
this is my first post on the dovecot list.
i have been using postfix with uw
i am getting the email bounced back with this message and i think it is
related to dovecot or a permissions issue.
thank you.
maildir
delivery failed: create maildir file
/dev/null/Mail/Dovecot/tmp/1212763230.P4560.izmail: Not a directory
2006 Jul 28
3
Forms: handle foreign keys (AssociationTypeMismatch)
Hi all
I tried and tried and tried, but I still fail in creating a form with
proper validation and stuff for foreign keys... So I''d really like to
get some help here.
I''m creating a booking site for DJ''s, and for every booking one can
choose one of different countries:
class Booking < ActiveRecord::Base
validates_presence_of :country_id
2008 May 01
5
Changing text in view with variables
in my view:
<% if @main_singer_1 == @your_singer %>
<% if @main_drummer_1 == @your_drummer %>
i want to have this in a loop so i can change _1
How would I do this.
I have some idea but I am not sure.
[1..20].each do .....
and then replace _1 with each of the numbers
or if someone can show the code to do this.
number = "1"
<% if
2012 Dec 29
2
I need intercept in plm model
Hi,R 2.15.2 plm() function on Windows 7
when i perform a plm regression, i can't manage to obtain the intercept, but I need it.it gives me just the beta coefficient.
my formula: fixed <- plm(deltaS ~ L1.deltaS + L2.deltaS, data=Mody_R, index=c("country_id", "date"), model="within")
my output: Coefficients : Estimate Std. Error t-value Pr(>|t|)