Displaying 20 results from an estimated 3000 matches similar to: "Problems with STI in has_many/belongs_to in Rails 1.1"
2006 Mar 29
4
Ruby/OCI8 not working on Rails 1.1
http://rubyforge.org/tracker/?func=detail&atid=1051&aid=3960&group_id=256
I posted this bug yesterday. Seems to be confirmed, since someone else
has the same problem on a different platform (Fedora 4 and Max OS X).
So, if you are using Oracle, don''t be in a rush to upgrade to Rails 1.1
unless you have the time to figure this problem out for yourself.
--
Lori Olson
2006 Mar 18
9
RJS - not working in IE
I searched thru all the postings about RJS, and I didn''t find one person
who complained of problems specific to IE, but that''s what I''ve got.
My environment is:
Rails 1.0 + RJS Plugin
Updated Javascripts to Scriptaculous 1.5.3 (for evalScripts support)
Monkeypatched in_place_editor to support evalScripts
I have just started using RJS, and I have two .rjs templates.
2006 Mar 29
5
Database passwords with numbers
I have database password in my database.yml as "passw0rd" however when I
go to http://localhost:3000/rails/info/properties I get this error:
private method `gsub'' called for 1:Fixnum
But if I just use "password" for my password everything is ok.
Any ideas?
--
Posted via http://www.ruby-forum.com/.
2006 Mar 18
2
in_place_editor change request...
Hi,
How do I make a request to the Rails team to include a line something
like:
js_options[''savingText''] = %(''#{options[:saving_text]}'') if options
[:saving_text]
in the in_place_editor method?
script.aculo.us supports the ''savingText'' option to control the text
displayed while saving after an in-line edit. Having the ability to
2006 Mar 22
1
RJS - Still not working in IE
The previous thread on this topic got a little disjointed, so I thought
I''d summarize the issue again, in hopes that someone could help. To
re-iterate, this rjs works in Firefox and Safari on Mac, and in Firefox
on Windows. It fails, in IE on Windows. The failure is that the second
page.replace_html seems to do nothing.
My environment is:
Rails 1.0 + RJS Plugin
Updated
2006 Apr 20
4
oci8 mac os x intel
Is rails + oci8 + mac os x intel a winning combination? It appears
that oci8 might be a issue.
2006 Apr 04
2
Ajax Effects Tutorial
Hi there,
I am in love with rails... And now I want to rule Ajax effects with
rails. Where could I find a book like: Ajax on Rails? :)
Tutorials will be welcome too.
Thanks in advance.
Fernando Lujan
2006 Mar 19
1
Finding RDoc templates
Hi all,
I would like to change my RDoc template to something similar to the
RDocs on this site:
http://caboo.se/doc.html
Does any one know where this template (or similar) or other RDoc
templates are available? I tried googling for rdoc templates for a long
time and came up with nadda. Thanks in advance.
2006 Mar 22
1
Lightning Fast Javascript Auto complete
<%= javascript_tag("new
AutoCompleter.Local(''search_start_station'',''start_station_auto_complete'',
stations);") %>
I have <%= javascript_include_tag :defaults %> in the head of my
layout.
But I always get an Error: "AutoCompleter is not defined".
Im using Rails 1.0, so I should have the latest javascript files.
The tag
2010 Aug 10
4
(Dreaded) STI, belongs_to
Having problems with STI. Names below have been changed to protect the
innocent. Imagine a system that allows someone to apply for one of two
different types of school scholarships. Each scholarship goes through a
different review process, represented by a state machine (this is not a
state machine question). So there are two state machine classes that
differ slightly and subclass a generic
2006 Apr 25
3
belongs_to and has_many
I know this has been rehashed many times, but I don''t get it.
I can''t find it documented to were I understand all the parts. I can
make this work using Rails database design conventions, but in this case
I am not able to do that.
I find examples, but the ones I find do not follow the conventions.
They also do not give enough information to understand what is going on.
In
2008 Feb 22
4
has_many and belongs_to in rails 2.0.2 (child.Parent) is not working
Hi All
I have 2 models working well in rails 1.2.6 :
class TypeService < ActiveRecord::Base
has_many :Services
end
class Service < ActiveRecord::Base
belongs_to :TypeService
end
I was able to get the name of the service with Rails 1.2.3:
s = Service.find(1)
name_type_service = s.TypeService.name <<-- Now with rails 2.0.2
that doesn''t work
With rails 2.0.2
s
2007 Sep 03
7
relationing has_many, belongs_to
Hello, i want to know if i am relationing fine, because i am having
problems,i have 2 models, one for members and other to relate some
members to this:
class Member < ActiveRecord::Base
has_many :matrix, :foreign_key=>:parent
end
class Matrix < ActiveRecord::Base
set_table_name :matrix
set_primary_key :userid
belongs_to :member, :foreign_key=>:userid
acts_as_tree
2006 Jan 15
2
Please help - Rails hanging on mysql connection
Trying to get Rails and mysql running on OS X, and I''m a Nuby.
Everything ran smoothly when I first installed, but after rebooting
things were out of whack. I finally got back into mysql after
re-installing, and at first when I tried to connect with Rails/Ruby I
got a message that my client was not up to date. So after reading some
info online, I set my mysql passwords with
2008 Apr 18
3
has_many and belongs_to with non-primary foreign keys
Hi,
I''m having a bit of trouble with my first Rails app.
----
I have two tables:
create_table :items do |t|
t.column :created_at, :timestamp
t.column :user_id, :int
t.column :text, :text
end
create_table :users do |t|
t.column :user_id, :int
t.column :name, :string
end
----
I''m trying to use the "user_id" field to link both tables, with each
user
2006 Feb 16
1
HABTM -VS- belongs_to/has_many, for self-referential joins
Ok, David says on page 241 that sometimes a many-to-many relation with
attributes are better implemented as an actual model instead of using HABTM.
Well, I''ve got that situation and I can''t figure it out.
All of the examples in the book have HABTM examples between 2 different
tables, but I want to have a HABTM relation on 1 table with itself. (e.g.,
if I have a table Things,
2006 Apr 07
5
Confusion about has_many / belongs_to ...
I have a table called players and its model Player, and I have a table
called games and its model Game.
In the games table I have:
player1_id int(11)
player2_id int(11)
I want the tables to be associated so that I can access the player
objects using table.player1 and table.player2 rather than having to
lookup the objects based on the ids.
I am not sure how to go about this but I suspect I
2006 Apr 07
4
STI and foreign_key problem
Hi,
I am trying to use STI since my classes only vary by one column in the
database.
Here is the structure (names have been changed to protect the innocent):
Case
/ \
Registered Initial
\ /
Children
A registered case has additional information than an initial case (I
realize I could just set a flag to separate them, but there is a good
reason to separate
2006 Mar 19
1
some strange behavior for has_many with STI
Hi all,
I''m having some trouble with a has_many association on a table using
the single table inheritance model that I''m hoping someone can help me
with. The schema for the table is:
CREATE TABLE `comments` (
`id` int(11) NOT NULL auto_increment,
`user_id` int(11) default NULL,
`type` varchar(20) NOT NULL default '''',
`type_id` int(11) NOT NULL default
2007 Apr 12
9
status of zfs boot netinstall kit
I wanted to send out status on the effort to make a
version of Solaris install available that supports zfs
as a root file system. I''ve got a version of it ready
for distribution, but I''d like to test it on the Build 62
community release before I make it available.
Without the build 62 community release, I have to
test it on a build 61 image, updated with some build 62
packages.