Displaying 20 results from an estimated 6000 matches similar to: "override << method"
2006 Jan 10
5
problems overriding module with plugin
Hi I am trying to create a plug-in to fix the error in the rails core
produced by the multiple delete on a HABTM relationship. I have
confirmed that my plug-in is being included into the base during
runtime however the code does not seem to be overridding the base
class.
module ActiveRecord
module Associations
module ClassMethods
def has_and_belongs_to_many(association_id, options =
2005 Dec 20
0
Problem destroying in unit tests with HABTM
Hi converted two of my models to HABTM today but I am having a real
hard time getting my unit tests to pass now. Specifically, when I
destroy a record I get this error:
...many many lines of this above...
(eval):4:in `destroy_without_habtm_shim_for_categories''
(eval):4:in `destroy_without_habtm_shim_for_categories''
(eval):4:in
2005 Dec 31
6
habtm recursion via destroy_without_callbacks
I am having a problem with two models that each have a HABTM
relationship to the other. For example:
CREATE TABLE people (id INT, name TEXT);
CREATE TABLE teams (id INT, name TEXT);
CREATE TABLE people_teams (person_id INT, team_id INT);
The person model has:
has_and_belongs_to_many :teams
And the team model has:
has_and_belongs_to_many :people
The trouble comes when trying to destroy
2006 Feb 02
3
acts_as_family_tree
For a project that I am working on I need to have a family tree. This
means that instead of having one parent each item has at most two. As
far as I know acts_as_tree only allows one parent_id. Any suggestions
on how to make a "acts_as_family_tree" ?
Thanks,
Mark
--
--------------------------------------------------------------------
I am Mark Daggett and I approve this message.
2005 Dec 02
3
Conceptual Design Question
Hi All,
I am making a DAM (seems to be the hip thing to do these days). It is
for the company that I work for. We have some really weird domain
rules that have prevented me from just using a simple directory
structure file permission system. I have come up with a solution but I
wanted to run it by you gurus to ensure that I am not recompiling the
wheel here.
Basically the domain rule is:
A user
2006 Jan 09
3
rails ignoring the migration file
I have a mysql database that I am trying to use migrations on. The
problem that I am having is that when I create a blob field in my
migration file like so:
t.column "data", :binary, :limit => 15.megabytes, :null => false
rails changes it to this in the schema:
t.column "data", :binary, :default => "", :null => false
not only is this not what I wanted
2006 Mar 12
1
a better way to alias methods
Hi is there a better way to accomplish this task?
class PortfolioController < ProjectController
layout ''portfolio''
def boing
redirect_to :action=>:index
end
alias_method :new , :boing
alias_method :destroy , :boing
alias_method :edit , :boing
alias_method :update , :boing
end
My portfolio controller implements view only
2006 Feb 10
7
convert rails object to javascript variables
Am i a total idiot to try and parse out a rails object for javascript
in this way?
<%
for i in interface_items[0].attributes
%>
var <%= i[0] %> = "<%=h( i[1] )%>"
<%
end
%>
Am I missing something really obvious?
Thanks,
Mark
--
--------------------------------------------------------------------
I am Mark Daggett and I approve this message.
2005 Dec 20
0
validates_uniqueness_of on has_and_belongs_to_many
I am trying to create a model that allows only unique assets to be
added to a category. However, they could be added again to a different
category. Finally, an asset can be shared across many categories. So
my question is how do you check the uniqueness across a join table?
This does not compile....
has_and_belongs_to_many :categories, :foreign_key => ''asset_id''
2006 Mar 25
2
acts_as_tree wierdness with children.count and children.size
i am making a category tree and i iterate over the category using my
counter_cache however it would show a different number than what was
actually being represetned in the tree.
Here is an example
cat.children = [cat2, cat3]
puts cat.children.size 2
puts cat.children_count 2
cat4.parent_id = cat.id
cat4.save
puts cat.children.size
2006 Jan 12
2
Finding by association
I have two objects that are associated in the following way:
class Class1 < ApplicationController
has_and_belongs_to_many :class2s
has_and_belongs_to_many :otherClasses
end
class Class2 < ApplicationController
has_and_belongs_to_many :class1s
has_and_bleongs_to_many :otherClasses
end
Now, when I run the following query,
@objects = Class1.find(:all, :conditions
2005 Dec 22
3
acts_as_stateless ?
Is there such a thing that I could use to store sessions in the DB
instead of in a cookie so that I can ensure users will be able to
access their session data even across several load balancers? We use
totally stateless machines here at work and I am worried about
deploying a rails app in production that uses a volitile session
stored on the machine.
Any help is great!
Happy Holidays,
Mark
--
2006 Mar 23
2
rails 1.1 and mysql errors
Hi,
I just upgraded to rails 1.1 this morning and i am getting a variety of
errors from tests that were passing effortlessly on the previous edge
release (i froze several weeks ago, so I not sure what version that was).
Has anyone else experienced these types errors with the new rails:
I have several errors that are grouped around create and destroy commands
the errors are similar, first the
2006 Feb 14
0
[REQUIREMENTS] Macromedia Flash View for Rails Controller
Hi I know there is no real requirements tag but I was unsure what to
label this message, please don''t flame me :-).
I am using the Javascript Integration Kit with Macromedia Flash to
make a local connection to the rendered Rails view. I am then using
Flash to render my page components (sort of like you do with Lazlo or
Flex etc.) though Javascript acts as a proxy for me. Ideally I would
2006 Feb 16
0
[JOB] Los Angeles South Bay
I am working on a very large Digital Asset Manager for a Los Angeles Based
Fashion Company. The application is about 60% done. I need help finishing
the project and advice on deployment scalability etc. I expect the project
to need roughly a month''s help for an intermediate to expert Rails
programmer.
If you are a competent programmer and can work "ON-SITE" in the Southbay of
2006 Jan 08
0
migration with blobs
Hi all,
I am trying to use migrate on my application and works great except
for the blob elements in my schema. MYSQL wants me to declare
LARGEBLOB for images the size I need to store but unfortunatly migrate
seems to just declare :binary as plain ol'' blobs. I like the idea of a
database agnostic database description but I''d like to find away to
specify the size of the blob
2005 Dec 16
0
upload problem with mimetypes
I am building a flash-based uploader for rails that allows multiple
files to be selected from a user''s hard drive and then put into a
queue for upload. This works great except that macromedia uploads
everything as "application/octet-stream". This means that displaying
the newly uploaded content inline is a pain because the browser asks
to download it first.
To get around this I
2001 Feb 15
0
The SSH trademark issue part #1
Hi,
I usually stay away from issues like this, basically because I'm not a
lawyer (and don't want to be one), and I don't have a real interest in
these issues.
Quoting Tatu :
> We also have a trademark pending on the Secure Shell mark
This seriously undermines the IETF standard draft. It's the same as
registering 'milk' as a trademark. Both Secure and Shell are
2002 Sep 23
2
can wine be run as daemon
I noticed that when i launched WINWORD.EXE the first
time it took about 20 seconds to load, but when i ran
it on the 2nd time it took about 10 seconds only!, it
seems that it is now cached in the memory...I was
wodering if it is possibe to load wine as a daemon so
that it will
be faster to load? sort of like a daemon? does my
analogy here make sense?
I would appreciate any help, comments,
2006 Nov 02
2
live dj
Hi all
i would like to know if there's a software to create a dj station taking the input from mic and stream with icecast, also i need to know if is possibe to mix mic input and ogg file and stream it togheter with icecast
thanks
__________________________________________________
Do You Yahoo!?
Poco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e ti da tanto spazio gratuito per i