Displaying 20 results from an estimated 20000 matches similar to: "acts_as_versioned_association plugin"
2006 Aug 13
0
Major update to acts_as_versioned_association
I''ve spent the weekend giving my acts_as_versioned_association (or
version_association for short now!) some much needed attention.
Unit tests have gone from a shameful 150 lines to well over 700 now -
around 1:3.5 code to test ratio. There''s still probably a lot which
needs testing, but it should be a lot better now.
It''s a fairly major update and there are some
2007 Aug 27
0
how to use acts_as_versioned_association
Hello,
I have been looking for documentation for acts_as_versioned_association
and can''t really find any. I have acts_as_versioned_working properly but
want to change to acts_as_versioned_association. Do I need to create a
3rd table to use as a reference or is it all done behind the scenes and
all I need to do is add the plug-in and:
acts_as_versioned
acts_as_versioned_association :
2006 Jun 13
9
act_as_versioned and join tables?
Greetings!
I''m attempting to use the act_as_versioned plugin to provide versioning
functionality for my rails app, but can''t think my way through this:
How can you use act_as_versioned to perform versioning on a HABTM join
table? It is easy to see how to do so for join models (:has_many
:through) but not so for the join table.
I want to use act_as_versioned to maintain
2006 Jan 20
1
stack level too deep from has_many / belongs_to relationship
I have the following 3 models (2 models joined by an intermediate):
1. class Exercise < ActiveRecord::Base
2. has_many :routines, :class_name=>''RoutineExercise''
3. end
1. class Routine < ActiveRecord::Base
2. has_many :exercises,
3. :class_name=>''RoutineExercise'',
4. :order=>''position''
5. end
1. class
2006 May 06
0
Issues using GUID plugin: IDs and acts_as_versioned
Hi,
First off, I think the GUID plugin is very slick (
http://wiki.rubyonrails.org/rails/pages/Uses+Guid+Plugin). However, I''m
running into a few issues:
ISSUE #1) Rails'' handling of IDs as strings instead of integers. In
particular, it didn''t seem to work when I had a model doing "acts_as_list"
with a scope:
Example:
Class Big < ActiveRecord::Base
2006 Aug 16
1
Naming rights_roles join model using has_many :through and polymorphic associations
Hi.
I have a couple of best practices questions regarding polymorphic
associations, naming join tables and user permissions.
Currently I have implemented the user authentication model from the
rails recipes book. Basically it goes something like this:
MODEL CLASSES:
class User < ActiveRecord::Base
has_and_belongs_to_many :roles
end
class Role < ActiveRecord::Base
2007 Sep 05
8
Hi..Guys new plugin again
Hi..
Guys new plugin again
Foreign Key Associations is a plugin that automatically creates
associations based on foreign-keys. The associations are created at
runtime-ie. as your ActiveRecord models are loaded-so they will always
be up-to-date.
For example, given a foreign-key from a customer_id column in an
orders table to an id column in a customers table, the plugin
creates:
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 Jul 26
1
AuditTrail in Rails
Hello there,
I need to build an audit trail system for an application. So far I have
been looking at acts_as_versioned and acts_as_versioned_association
plugins. I am having troubles getting the second one to work.
Any how, do you have any suggestions about how to build a robust audit
trail?
Thanks,
Roland
--
Posted via http://www.ruby-forum.com/.
2006 Mar 29
0
Many-to-many relationship with multiple models?
I have a simple CMS I''m creating, and the primary model is the
"listing". A listing habtm (has_and_belongs_to_many) categories (up to
two) - allowing the listing to print its categories and a category to
print its listings. I also need subcategories, which are different from
categories in two ways: a listing can have as many subcategories (from
it''s two categories)
2006 Jul 12
1
odd habtm behavior? or is it me?
Hello List,
I''m a bit spent on this problem, and my code might be whack. I seem to be
encountering a problem where the primary key on a join table is not being
resolved correctly. I will elaborate after some code bits. I am creating
the join table using migrations, and relevant model code is this:
class Post < ActiveRecord::Base
has_and_belongs_to_many :records
2006 Jul 04
1
Has_many :through with checkboxes?
Just when I started getting the hang of has_and_belongs_to_many
relationships, I realize that I should probably convert several of my
app''s joins to has_many :through type relationships.
One example, pairing users with categories via subscriptions, where
each user can be the "owner" of a category, has given me particular
trouble when I try to update a user''s
2006 Jul 04
2
has_many working correctly only on reload!
I have this code that is using svn externals with rails EDGE working
fine for the past couple of months. A couple of days ago, this code
died. Even after deleting vendor/rails, this code doesnt work:
class Tag < ActiveRecord::Base
has_many :taggings
has_many :events, :through => :taggings
has_many :users, :through => :taggings
end
class User < ActiveRecord::Base
# Virtual
2006 Jun 03
1
First time plugin user: Problem with "acts_as_versioned"
Hi,
I am having trouble with using the acts_as_versioned plugin. I installed
the plugin, and ran the migration. acts_as_versioned created the
versioned table OK, but when I try to use it I get an error. Here is
some console output:
>> m = Mymodel.find(:first)
NameError: undefined local variable or method `acts_as_versioned'' for
Mymodel:Class
Did I miss a step?
Ingo
--
2006 Jan 07
4
To Chris Hall - Re: DB Modelling the Rails way - Opinions??
Chris,
Finally got time to fully play with your suggestions. Had to re-code a
bit of stuff but the concept works - just like a bought one :~). Many
thanks for the solution,
Kind Regards,
Eric.
For those curious - here''s what it was about;
On Monday 02 January 2006 02:10, Eric Sloane tried to type something like:
> Hi,
> I''m trying to figure the most efficient way to
2006 Mar 29
0
Intermittent error - undefined method ''destroy_without_callbacks''
When testing my app locally I''m getting intermittent errors which are
driving me mad!
The error is:
NameError ((eval):1:in `alias_method'': undefined method
`destroy_without_callbacks'' for class `Exercise''):
Refreshing the browser sometimes fixes it, as does restarting WEBrick.
Annoying to debug as it only happens intermittently.
Any ideas on why this is
2006 Mar 20
2
AHHHhhhhh... has_and_belongs_to_many, that is going on?
I don''t have a class by the name of "ReviewersScoreCard", yet my many to
many configuration looks as follows. And, these errors while running some
simple test with ./script/console is giving me a headache:
./script/console
Loading development environment.
>> r = Reviewer.find_first
=> #<Reviewer:0x19d0a48 @attributes={"id"=>"1",
2005 Jul 07
3
NameError Exception
Ruby/Rails n00b here so go easy on me...
I''ve been wracking my brain trying to figure out what is wrong here.
I''ve checked all my models for the appropriate belongs_to, has_many,
etc. I''ve checked to make sure I''m using singular and plurals in the
right spot. I''ve checked my syntax around all my "within"''s and nothing
seems to fix
2006 Apr 16
2
conditional updated_on update
Hi list,
I''ve got some counter_caches in a model. When these get incremented - say on
a page view - my updated_on column also gets updated. How can I
conditionally not update updated_on if just these counter_cache columns
change?
The problem with that is that I am using acts_as_versioned which clones the
record each time updated_on changes. I am successfully ignoring the
counter_cache
2010 Jul 04
1
Rails 3: ActiveRecord .include not working
Really no idea what''s up...
class Auction < ActiveRecord::Base
has_and_belongs_to_many :categories
end
class Category < ActiveRecord::Base
has_and_belongs_to_many :auctions
default_scope order(''title'')
scope :active, where(:active => true)
end
class CategoriesController < ApplicationController
respond_to :html, :json
# GET /categories/:id