Displaying 20 results from an estimated 5000 matches similar to: "Change Ruby on Rails' reserved words?"
1999 Nov 08
1
User's smbd processes don't get killed
Hi, all.
Last saturday, we've done a cutover for Samba 2.0.5a to be our new
fileserver. All is going well, except for two network users that make me
reboot the server.
What happens is as follows:
* user logs on onto samba server;
* user opens and closes files, etc, OK until in one of these
operations his/her machine hangs;
* user reboots his/her machine to log on again. In this
2006 Jul 28
0
reserved words
I''ve seen this topic has been discussed a couple of times. However, I''m
wondering if a method exists in rails to test a name against the reserved
words listed on the wiki?
Just wanted to check before I write this myself (and type in all of those
names -- including PostgreSQL).
To explain the application:
I''ve written a project that manages ldap data. On a fresh
2006 Mar 06
2
is "alias" reserved?
I''m playing with an online store....
I have an orders table which holds orders (pricing, statuses, etc).
An orderDetails table which holds detailed line items (itemNumbers, unit
prices, etc).
Each order can have multiple shipping addresses, so I also have
an addressbook table. Each orderDetail is tied to an addressbook entry
via the ordernumber and addressbook alias, but this
1999 Nov 10
0
Script for removing stale sessions: version for RH6.0? [Offtopic?]
Hello, people at SAMBA list.
I'm going thru the same problem that Nicholas Williams has
described in samba-list first (see references below), and I'm implementing
the solution you've decribed in the list
(SO_KEEPALIVE, etc). But I'm stuck with the script issue, as I run RedHat
Linux 6.0 which doesn't use ksh but pdksh instead. The ksh script doesn't
run in pdksh
2008 Apr 09
6
Using Ruby on Rails with existing database
Hi, I''m a complete newbie to this, I''m afraid. Apologies if this has
been answered elsewhere, but I''ve had a look, and can''t find the
answers I''m looking for, especially for using Rails 2.0.
We have an existing database which we would need to connect Rails to,
and the database structure is not what Rails would seem to expect.
Firstly, tables are not
2006 Jul 22
3
Extend dynamically a model
Hello,
I''ve a model defined as
class Account < ActiveRecord::Base
end
This maps a mysql table Accounts. I want to be a able to dynamically
change this model. During the life of my app, the table Accounts may
change name, how do I do a set_table_name not within account.rb?
--
Posted via http://www.ruby-forum.com/.
2006 Mar 25
4
dynamic set_table_name for achives
How can I pass something to set_table_name so that I can switch tables
on the fly for accessing archive data?
If I could access sessions inside a model I would do something like:
if @session[:current_period]
set_table_name "statistics_" + @session[:archive_year]
else
set_table_name "statistics_" + Date.now.year
end
But since I cannot access the session from within a
2007 Jan 14
2
rspec and set_table_name?
Hi there
I have a Value class in my Rails app; however ''values'' is a reserved
word in MySQL so in my value.rb file, I''ve declared set_table_name as
''vals''.
However, in setting up my specs for this model, I''m hitting errors
that seem to be resulting from rspec not seeing the set_table_name
declaration in my model file.
For instance,
2006 Apr 07
6
Foreign Key naming convention override
I am working with an existing database and have to keep all table and
field names as they are. ''tblcustomers'' and ''tblitems'' are linked by the
''tblcustomers'' id field ''tblcustomersid''. In ''tblitems'', the foreign key
is called ''txtcustomerid''.
I have already set the customers model to
2006 Apr 18
7
Connecting to multiple databases
Hi Everyone,
I am trying to connect to multiple databases and followed along the
Recipe in Chad Fowlers ''Rails Recipes'' book (which basically is about
establishing the connection in a subclass of ActiveRecord::Base, and
inheriting all classes in need of this connection from this class)
Chad Fowler says:
"You won''t be able to instantiate an External, of course,
2009 Mar 18
1
set_table_name woes, fragmented domain class
Hi all,
I''m running Rails on top of a Mongrel cluster. I have several model
classes that are going to have so many records it is not feasible to
keep them all in the same table. So I''ve split out the records into
many different tables, each with its own suffix which corresponds to
the id of the model to which all records in that particular table
belong.
For example,
2006 Jan 19
4
multiple database in the same actions?
Hi,
I read the example in
http://wiki.rubyonrails.com/rails/pages/HowtoUseMultipleDatabases,
it show us how to connect to other database, each time
we start a new action, however, this doesn''t work
while you try to connect to two different database
within the same action.
SO I wonder is it possible to bind to two or more
database within the same action????
Thanks you very much
Saiho
2006 Jan 18
3
legacy database on remote host
I''m getting this error in webrick then it crashes leaving nothing in the
log.
ruby: symbol lookup error:
/usr/lib/ruby/gems/1.8/gems/mysql-2.7/lib/mysql.so: undefined symbol:
mysql_sqlstate
Here is the standard query I would normally write to get the data.
select * from child,parent
where CONCAT(SUBSTRING(child.item_number,1,14,''00'') =
parent.order_number and
2006 Oct 20
0
Reserved words
Is there a more definitive list of reserved words
in Rails than the one at
http://wiki.rubyonrails.org/rails/pages/ReservedWords ?
While it''s nice to read war stories of Wiki users running into
these issues, it might be nicer to get a canonical,
using-these-variable-names-is-asking-for-trouble list from the
developers.
As an example, I had a model "Build" (as in a
software
2007 Jul 10
1
Reserved words
Is action_id reserved_
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
2009 Apr 24
4
Overriding Model Name
If I understand things correctly, by default, Rails expects both the
ActiveRecord class name and the model name (i.e., the name of the file
that contains the definition of the ActiveRecord class) to be the
singluar of the table name. How can I override this default behavior
with respect to the model name? That is, I would like to have the
file name of the file that contains the definition of the
2003 Mar 05
2
reserved words documentation
I wanted a data frame component to be named "next", for example:
> m <- data.frame (matrix (0, nrow=2, ncol=2))
> names (m) <- c("prev", "next")
> m
prev next
1 0 0
2 0 0
But "next" being reserved prevents $ indexing without quotes:
> m$next
Error: syntax error
> m$"next"
[1] 0 0
Although they are mostly
2013 Mar 01
2
using reserved words in R, and reuse variable names in different functions
Hi list,
I am writing several functions and running out variable names. I am using
words such as "t", "c", "matrix" to keep the notation same as formulas I am
using.
For example I have,
unnormalized <- function(t, x, y){
val <- rnorm(t, mean=x, var=y)
return(val)
}
metropolis <- function(t, c, x, y){
den1 <- unnormalized(t, mean=x, sd=y)
2006 Jan 17
15
legacy database and finder_sql nightmare!
This is my first rails app with a legacy database and I''m having a
terrible time getting the models set up correctly. I have an order
table that has a primary field named order_number. I have a name table
with a primary of item_number. These two tables are liked by the
item_number and the order_number, but not as you might think. If the
order_number is 2500, then each entry in
2006 May 15
8
set_table_name and self.table_name
I have some legacy tables that I used set_table_name on, I''m attempting
to write a method that will get key value from a sequence table and then
update it and return a value. I''m hoping to put this in the base
ActiveRecord method so I would like to reference the table name with
self.table_name or something...
class Contacts < ActiveRecord::Base
set_table_name