similar to: acts_as_rateable in rails 2.2.0

Displaying 20 results from an estimated 1000 matches similar to: "acts_as_rateable in rails 2.2.0"

2006 Dec 22
2
Relating Namespaced Models
I am dealing with a large project. I use a lot of STI and therfore have a lot of models. I''d like to use namespaces to help organize my models but am having trouble getting started. I have a base model Term::Base located in /app/models/term/base.rb: class Term::Base < ActiveRecord::Base set_table_name "terms" end I have a non-namespaced client model: class Client <
2007 May 24
3
Annoying problem, stack error
For some reason rake spec is totally crapping out on me. I don''t know what I did to make it break, the only thing I tried new was install haml, but even after removing it there is still a stack trace. Here is what I am getting- sparta at phalanx ff $ rake spec (in /Users/sparta/Projects/work/idastudios/ff)
2007 Jun 01
0
"Exception: stack level too deep" on collection.clear?
Without getting too deep into my app I''m wondering if anyone has any clues what might give rise to the error posted below. It occurs when I run my unit tests. class Actor < AR:Base belongs_to :court_case end class CaseCause < AR:Base belongs_to :court_case end class CourtCase < AR:Base has_many :actors has_many :case_causes ... end def my_test_method ...
2008 Sep 25
1
defining polymorphic type condition
As great as Rails 2.1 is, I for the life of me cannot figure out why polymorphic associations do not support reconfiguring the type column used. For example, I have no way to do a polymorphic association using a lookup hash which maps an integer to a class name. Storing a TINYINT unsigned is waaaaay more efficient than storing a string like "SomeActiveRecordModel" over and over again.
2007 Jun 04
1
acts_as_rateable in Beast
I''m trying to implement acts_as_rateable to my Beast installation to give users the option to rate posts (like reddit). I chose acts_as_rateable as it supposedly easily allows reddit-type voting but I''m having some problems setting it up and the documentation seems outdated. (http://www.juixe.com/techknow/index.php/2006/07/05/acts-as-rateable-plugin/) So far, I''ve
2009 Sep 09
0
Rails 2.3.4 ActiveRecord association problem
Upgraded our app from Rails 2.2.2 to 2.3.4, and I''m now encountering an error when adding a child to a parent. Top of the stack: wrong number of arguments (1 for 0) /Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/ associations/has_many_association.rb:61:in `save'' /Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/
2007 May 30
2
ActionView::TemplateError
Hi, I have a strange problem that only occurs on the production server. I''ve been banging my head for hours trying to figure it out with no success. Below is a copy of the error from the production log. ActionView::TemplateError (Expected /www/rails_apps/scanlan/current/ public/../config/../app/models/image.rb to define Image) on line #6 of app/views/admin/design/_record.rhtml: 3:
2006 Aug 08
1
File upload into Mysql (using lighttpd) problem
Hello All, I''ve run into a snag. (I apologize in advance. I''m not very good at system administration.) I''m building an app that allows users to upload files. Up until now I have been storing the files on the file system, but tonight I decided to change the app so the files are stored in the database as a longblob. I thought everything was working great, until I
2007 Oct 31
0
another question about acts_as_rateable
I''ve been trying to add some rating capabilities to a site I''m working on, I''ve been following a few tutorials (one being http:// www.juixe.com/techknow/index.php/2006/07/05/acts-as-rateable-plugin/) and I keep seeing something that''s confusing me. ---- from the tute : (in my ratings controller) post = Post.find(params[:id]) post.add_rating Rating.new(:rating
2006 Aug 15
0
SystemStackError: stack level too deep
Hi I have two models Keyword and KeywordResult, they basically look like this: class KeywordResult < ActiveRecord::Base belongs_to :keyword validates_presence_of :title, :url, :keyword_id end class Keyword < ActiveRecord::Base has_many :keyword_results, :dependent => :delete_all acts_as_tree :order => "text", :foreign_key => "top_keyword" end Before you
2006 Feb 23
3
has_many reference
I am trying to do something right from Agile Web Dev with Rails book and it does not work. I must be missing something obvious. I have a one-to-many relationship: class Draft < ActiveRecord::Base has_many :endorsees end class Endorsees < ActiveRecord:: Base belongs_to :draft end >From my reading, methinks I should be able to say: d = Draft.new d.endorsees << Endorsee.new
2008 May 16
0
attachment_fu and/or rmagick on osx -- weird error
One of our developers is getting a weird error from attachment_fu and/or rmagick on OSX. And even weirder because he''s used attachment_fu and rmagick on other projects without difficulty. This all works fine on debian/ubuntu. See the stack trace below. Any suggestions? Btw, the code that''s blowing up is retrieving the attachment_fu info. The presence of image_science in
2006 Jan 19
7
bug in has_many count?
I can submit a patch, but wanted to confirm I''m looking at this right... The docs indicate that if you specify a has_many association with :finder_sql, but no :counter_sql, it constructs the appropriate counter sql by substituting the SELECT clause. But has_many_association.rb doesn''t seem to do that -- it just passes Base#count_by_sql the finder_sql, which doesn''t
2005 Dec 11
4
Problem with acts_as_paranoid: "ArgumentError: Unknown key(s): group"
Here''s the full error: 1) Error: test_add_message_to_existing_ticket(TicketTest): ArgumentError: Unknown key(s): group /usr/lib/ruby/gems/1.8/gems/activesupport-1.2.4/lib/active_support/core_ext/hash/keys.rb:48:in `assert_valid_keys'' /usr/lib/ruby/gems/1.8/gems/acts_as_paranoid-0.2/lib/acts_as_paranoid.rb:125:in `validate_find_options''
2007 Feb 08
5
a possible bug in Has_many :through using :soucre
I''ve been stumped on this for a few days and I''m not sure if it''s an error on my end or an actual bug. I have a system where I have workshops and users. Workshops have students, presenters, and troubleshooters. I wanted to represent this simply by using has_many :through with :source. Workshop has_many :presenters, :through =>:presenterships, :source=>:user
2010 Sep 01
0
Error on update_attributes with HABTM relationship
Hope someone can tell me what''s up, because this has me baffled. I have an Image model, and a Provider model. Both are defined as "has_and_belongs_to_many" relating to each other. In my image form partial, I have a bit of AJAX generating the provider_ids array dynamically from a provider AJAX search on the same page. So for example, each time I click on a provider name that
2008 May 12
3
Enumeration sum
Any idees why I can do this: @sum = @selected.inject(0) { |sum, player| sum + player.value } but not this: @sum = @selected.sum { |player| player.value } @sum = @selected.sum(&:value) The last two give me following error: wrong number of arguments (1 for 2) /Library/Ruby/Gems/1.8/gems/activerecord-2.0.2/lib/active_record/associations/association_collection.rb:164:in `calculate''
2006 Sep 23
8
acts_as_rateable plugin help!
Hello, I am having some trouble figuring out how to use the rateable plugin. i followed as close as the directions located at http://www.naffis.com/blog/articles/2006/08/31/rails-ajax-star-rating-system but i fail at working it. i am getting this error You have a nil object when you didn''t expect it! The error occured while evaluating nil.rating Extracted source (around line #1): 1:
2006 Jun 06
0
Scaffolding Extension - Polimorphic Associations
When I try to use it with polimorphic associations I get the following error In browse action: activesupport-1.3.1/lib/active_support/dependencies.rb:100:in `const_missing'': uninitialized constant Privable activerecord-1.14.2/lib/active_record/base.rb:1246:in `compute_type'' activesupport-1.3.1/lib/active_support/dependencies.rb:131:in `const_missing''
2006 Jan 23
0
type mismatch because of misled array index
Most times I look up a list of books I want to know a page reference for each one, so the views that display booklists expect an array of two-element arrays, constructed via a method in the model like so: (class Category) def book @book = Array.new self.bookshelves.each { |x| @book << [x.book, x.pages] } return @book end When I get the list of all books that a user has