similar to: has_many_polymorphs is breaking my spec file

Displaying 20 results from an estimated 100 matches similar to: "has_many_polymorphs is breaking my spec file"

2008 Mar 12
2
nested routes with a 2-way has_many using join table?
I have two classes, InstructionalObject and Assets. They both have_many of the other, implemented through a join table (so it''s like a habtm without the habtm). For the next version of our app, we''re refactoring to RESTful, and i''m having trouble with my nested resources/routes. I tried this, in routes.rb: map.resources :assets do |assets| assets.resources
2008 Feb 11
3
Should there be trouble w/has_many_polymorphs in a plugin?
Folks, As much as I like generators, I''d greatly prefer to just throw my has_many_polymorphs tagging and commenting engines into projects as plugins. However, after transplanting my tag.rb and tagging.rb files into the lib folder of a ''has_many_tags'' plugin and adding the obligatory plugin requirements (init.rb and an include in environment.rb), I''m not having
2008 Feb 22
7
Testing misc methods in ApplicationController
I''m already successfully testing before_filters in application_controller courtesy of this blog post: http://www.movesonrails.com/articles/2008/01/23/spec-ing-your-application-controller However, i can;''t work out how to test the sort of method that is added to application_controller so that all controllers can use it. It must be something simple that i''m doing
2008 Jan 20
2
Which taggable library do people use?
I''d like to add taggability to a model in the site I''m working on, and I wanted to get an idea of what people are using. I keep seeing that acts_as_taggable is deprecated, so I tried the acts_as_taggable_on_steroids. I also tried be_taggable. In any case, I figured I''d see what people use. thanks. -corey -- http://www.coreyhaines.com The Internet''s Premiere
2010 Mar 23
1
has_many_polymorphs with searchlogic
Has anyone been able to use searchlogic with has_many_polymorphs? Are they compatible? -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to
2007 Nov 14
1
has_many_polymorphs and acts_as_list ?
First, BRAVO for this wonderful plugin: has_many_polymorphs ! Now my problem: 4 models : Collection, Page, Fragment, Belonging (which is the join table): 1 class Collection < ActiveRecord::Base 2 has_many_polymorphs :elements, 3 :through => :belongings, 4 :from => [:pages, :fragments, :collections], 5 :as => :collector, 6 :parent_order =>
2007 May 07
7
A little love for acts_as_taggable #8279
I was working with acts_as_taggable earlier and thought I could make it a bit friendlier. I submitted a ticket and patch #8279. Basically, there are three differences. 1. Fixed the deprecated :dependent => true 2. Added migration generator (it has really specific requirements on table layout, so might as well generate it). 3. Expanded the README to explain using the migration and to include
2006 May 20
7
Polymorphic, many-to-many, self-referential data model
No matter what I try I''ve been unable to work how to get this to work with the cool ActiveRecord helpers. I''m not sure if it''s possible, Josh Susser''s blog suggests it is, but damned if I can work it out... I have: Container which can contain one or more Element. An Element is a polymorph of either a Container or a Chunk. An Element can exist in one or more
2008 Jan 18
2
has_many :through with self-referencial AND polymorphism
Hello, despite many readings I still don''t understand how to solve my problem. I have Publication, Picture, File classes A Publication can be related (a one way relation, like a www link) with another Publication, Picture or File I tried this : Publication : has_many :related_elements, :dependent => :destroy, :foreign_key => :publication_id has_many :related, :through =>
2007 Aug 02
2
STI functionality, but then with multiple tables
Hello, I''m creating my own Tumblr [tumblr.com] like rails app. It''s like a blog, but in this case a blog post could be of a certain type, i.e. a regular post, a video, a link, a photo, a song(info). Well now, it''s clear that they share a lot of similar functionality: title, created_at/updated_at, commentable, probably has an author_id, etc.. But besides that they are
2012 Jul 31
1
puppet doc questions
Does puppet doc require a specific version of any gems (such as rdoc or rake) to operate? I''m getting some errors when I try to generate my rdoc now. # puppet doc --output /var/www/test --modulepath /etc/puppet/environments/test/modules -m rdoc RDoc::RDocError is deprecated and will be removed in RDoc 4 Could not generate documentation: uninitialized constant RDoc::RDoc::Generator
2008 Mar 05
0
Overloaded has_many_polymorphs method is still being called
I have a has_many_polymorphs class called Property. For the various classes that are polymorphs, i''ve written a module with methods relating to Property, that they can all include. One of my methods is called ''add_properties'': it creates some new associations, but also does a couple of other things (such as update the object''s ferret index, and return a
2007 May 15
5
Problem with RJS and/or Prototype.js =>ResponseText is blank
Hi, I''ve got a real head-scratcher. I''ve got a standard Ajax form using form_remote_tag, which calls a controller action which adds a comment and then sends back some JS via RJS which updates a few items on the page. It did work fine but (and I''ve no idea what has happened) now it doesn''t. It calls the controller action but gets an empty response back and
2007 Sep 23
3
Connecting a row of an unknown table to another row of an unknown table
Hello all, I''m currently designing a web app in Rails that lets me keep a directory of free/opensource computer games. Each game has attributes like name, website, review, etc., but each game can also be associated with a set of genres and gameplay elements. The main three tables I''m working with are "games", "genres", "elements",
2011 Jul 20
2
polymorphic assoc seems only best for multiple parents ?
I have done a little polymorphic associations stuff and have refreshed my memory on it again. What it seems like is that if I have a particular record and I want to make it easy for many different parent records to associate with it using has_one or has_many, that is fine. If I want a parent record to have multiple kinds of children through one association, I don''t see how to do that
2008 Feb 01
3
rspec crashes if any tests have failed - is this normal?
I just installed spec (plugin) and rspec_on_rails. It seems to work, but if any tests have failed, after doing the report it seems to crash, with this message - 5 examples, 2 failures rake aborted! Command ruby -I"/home/jars/rails/lesson_planner/branches/max/vendor/plugins/rspec/lib" "/home/jars/rails/lesson_planner/branches/max/vendor/plugins/rspec/bin/spec"
2007 Nov 29
0
has_many_polymorphs for user owned tags
Hi all, I''m trying to extend the tagging functionality of has_many_polymorphs to work with user owned tags - ie, putting belongs_to :user in the Tagging model. So I changed the index in the generated migration, and added user_id to the taggings table. Then I added belongs_to :user in the Tagging model. In the lib/tagging_extensions.rb file I added a new function: def
2008 Sep 26
0
self-referential tags, has_many_polymorphs
Hi, I''m looking to add tagging to an application, and I would like to allow self-referential tags, so that I can tag my tags. With the goal of generating a flexible tag hierarchy. After some googling it looks like acts_as_taggable is not the best piece of code, and I''m hoping to use the has_many_polymorphs plugin from http://github.com/fauna/has_many_polymorphs/tree/master.
2008 Mar 05
14
[Stories] Login and subdomain
I''ve just begin using rspec stories, and i m encountering some problems. In my application i have different subdomains in which specific users can log in, for example an admin will go to admin.myapp.com/authenticate/login, and an user belonging to a specific company will log in company.myapp.com/authenticate/login, and of course both have a different login process. To perform some
2010 May 25
2
Site Navigation With Polymorphic Has Many Through
Hi, seem to keep running into a wall here. I can''t find any resources on site navigation that can deal with any model being in the nav, allow nesting, and can dynamically update. So I thought about it for a while, and decided on a MenuItems class, which contained the position of the child in relation to it''s siblings, where the parent and the child were polymorphic. Then a given