Displaying 20 results from an estimated 100 matches similar to: "is it possible to duplicate a key? --new"
2011 Jul 25
5
Arel quiz: complex queries with associations
I have a real-world application with some complex queries that I want to
convert to Arel (as part of an upgrade to Rails 3.1). So that I can
understand what I''m doing before I flail around in my real app, I wrote
a little sample app (just the models) with some similar associations --
one table joined with itself and more tables that join to another table,
so there are some queries that
2005 Dec 30
5
HABTM with finder_sql problem (Rails bug?)
I''m building an app that needs i18n support across the entire database
(i.e. localized attributes). In order to do this I''ve created a
special HABTM join table that can be associated with _any_ other
table:
create table language_strings (
for_table varchar(255) not null,
foreign_id int not null,
language_id varchar(5) not null,
attr_name varchar(255) not null,
value text
2006 Jul 24
2
InPlaceSelectEditor question
I''m attempting to use the example given in the Rails Recipes book chapter 2,
to create a select drop-down using the InPlaceEditor function (modified to
be InPlaceSelectEditor.
The example given works (a country list drop-down), but I''m attempting to
use it to display a list of items generated from an object in another table
that is linked to the table that I''m editing.
2006 May 11
2
Making my site multi-lingual
Hi,
I''m wondering how I should go about making my website multi-lingual.
Basically, there will be different content for the different
languages, and that''s not really a problem... all I need to do is give
each content entry in the database a language_id. But the problem is
with the non-content text, eg, "In order to access this area, you must
be logged in",
2006 Feb 26
3
Rails Naming Conventions
DB field names:
If I have a table that references 2 or more separate users from my users
table, is there a recommended naming convention for this situation? In
my case, I have 3 users associated with a record in my projects table:
requester_user_id
created_by
updated_by
I could name one of them "user_id", and then projects.user would work I
guess, but wouldn''t work
2006 Jun 05
0
Failed to install Globalize plugin
My envrionment is Rails 1.1.2, Ruby 1.8.4, MySQL 5.0.21 on WinXP. When I
run ''rake migrate'' after pulling the lastest 1.1 branch of Globalize
plugin, I get the following error message:
(in C:/Rails/Application/medicalmind)
== GlobalizeMigration: migrating
==============================================
-- create_table(:globalize_countries, {:force=>true})
-> 0.2110s
2007 Dec 21
1
in_place_editor not working for Internationalization
I''m trying to implement internationalization in my app. I followed
the instructions on the Globalize example (http://wiki.globalize-
rails.org/globalize/show/Example+Application), using in_place_editor.
The translation works fine, however, I can''t get in_place_editor to
work to translate the strings.
My controller:
class Admin::TranslateController < ApplicationController
2012 Aug 28
17
Tilde en RStudio
Estimados miembros de la lista,
Cómo hago para trabajar con tildes en RStudio.
En concreto, cuando cargo un archivo .txt o .csv en RStudio, no me reconoce
el tilde com tal y me coloca otros caracteres en su lugar.
¿Existe alguna solución?
Saludos,
Manuel
--
*Manuel Spínola, Ph.D.*
Instituto Internacional en Conservación y Manejo de Vida Silvestre
Universidad Nacional
Apartado 1350-3000
2014 May 18
3
Utilizar scripts de PHP en R
Hola a todos, Estoy interesado en usar un Script de PHP desde R y me
gustaría saber si eso es posible y como se hace. Muchas gracias de antemano
por las respuestas.
[[alternative HTML version deleted]]
2006 Jul 25
1
newbie--how do i load a parsed file?
Hello there,
I''m new with ruby on rails and i don''t know how to load up a parsed file
into my database. I have my ruby script that parses it but don''t know
where to put my code, or how to combine it with view/model/controller.
this is what i have:
class Description < ActiveRecord::Base
def import_strings(a_file)
table = { }
2007 Oct 05
1
Custom helpers for list of options?
Hi all,
I have a model that "belongs_to" many other models, many of those
models are just list of names, like country, state, city, profession
... I read about the country_select helper.
Is better to have all those tables or use custom helpers? what the rails way?
Thanks.
For example : http://pastie.caboo.se/104092
# = Schema
# country_id integer
# city_id integer
#
2006 Jul 24
2
Newbie error message!
hello you all,
I''m new with Ruby on Rails. I''m developing an application. I got the
follwoign erro, can anybody give a hand?
ArgumentError in AdminController#import_strings
wrong number of arguments (0 for 1)
RAILS_ROOT: ./script/../config/..
Request
Parameters: {"commit"=>"Import",
2002 Mar 04
1
String Resources & Popup Problem
Ok, that's done.
Now after this the should compile and run :
in En.rc MAIN_MENU is defined now like this :
MAIN_MENU MENU
{
POPUP "&File" {
MENUITEM "&New...", 0x100
En.rc is included by #include "En.rc" in rsrc.rc.
And gcc complies about it when compiling :
[syl@snoop notepad]$ make
gcc -c -I. -I. -I../../include -I../../include -g -O2
-Wall
2007 Jul 18
10
Rails - Mock going out of scope?
Hello list,
I think I have a rails related RSpec problem with a mock going out of
scope on a recursive call to a model.
The code is at: http://pastie.textmate.org/79821 if you want to see it
highlighted. I have pasted it below as well.
Basically, I have an acts_as_nested_set model called "Node", which
works fine. I have a function which finds the language name of the
node instance.
2010 Aug 13
2
samba-3.5.4 + OpenLDAP
Hi folks,
I having a problem compiling Samba (Last Stable Version) from source on
a Debian fresh install.
Escenario:
OS: Debian Lenny 5 64 bits
Kernel: 2.6.26-2-amd64
Samba Version: 3.5.4
OpenLDAP Version: slapd_2.4.11-1
I tried this before and after the OpenLDAP installation and always have
the same error:
./configure --with-ldap --with-ldapsam
.
.
.
.
.
checking for LDAP support...
2007 Sep 30
9
Problems with testing nested routes using mocking
Hello forum
I have there to files
#----- virtual_host_controller.rb
class VirtualHostsController < ApplicationController
before_filter :capture_domain
# GET /domain/1/virtual_hosts/1
def show
@virtual_host = @domain.virtual_hosts.find(params[:id])
respond_to do |format|
format.html # show.rhtml
end
end
private
def capture_domain
if
2000 Nov 21
1
Exist the S 'dates' function in R?
Good afternoon,
I am a new user of the R application, and I don't know to much about the
lenguage.
I am trying a to run some of the S programs I have, and some of them are
crashing with the "dates" function. This function translate a character
string into a 'dates representation object'.
Do you know if there is a similar function in R?
Thank you very much for your help
2006 Nov 04
0
Using collection_select and ajax
(I posted this earlier but it doesn''t appear on the group, so I''m
writing it again, If it appears twice, I apologize.)
I have a drop-down box that allows the user to select a language. I
want to use Ajax to render a filtered list of items based on the
language selected. I don''t want the user to press a Submit button nor
refresh the page, of course.
I''m using
2006 Aug 27
3
n-to-m relationships in Forms
Hi,
I can''t understand the RoR-API concerning certain form helpers. Can you
maybe help me?
I have a model, Film, with a habtm-relationship to the model Language.
Now if I want to have a form for editing/creating a Film, I''d like to
have checkboxes for each Language with those checked that are associated
with the Film in question.
Is there an "easy" way to do this
2006 Jul 07
0
has_many relation handling
Hello,
please have a look at this:
My tables:
create_table :languages do |t|
t.column :name, :string, :limit => 3
t.column :title, :string, :limit => 30
end
create_table :categories do |t|
t.column :category_id, :integer (3.)
t.column :created_at, :timestamp
t.column :updated_at, :timestamp
end
create_table :categorytranslations, :id