similar to: Patch to #5140 - same issue could be elsewhere...

Displaying 20 results from an estimated 10000 matches similar to: "Patch to #5140 - same issue could be elsewhere..."

2010 Mar 09
1
Ruby 1.9 and Searchlogic problem
Hello, After updating our Rails app to ruby 1.9 there are some problems with searchlogic, here you can find the error : Error : wrong number of arguments (1 for 0) Full trace ( passenger ) : /usr/local/lib/ruby/gems/1.9.1/gems/activerecord-2.3.5/lib/active_record/named_scope.rb:92:in `call'' /usr/local/lib/ruby/gems/1.9.1/gems/activerecord-2.3.5/lib/active_record/named_scope.rb:92:in
2010 Mar 01
0
undefined method for Polymorphic association using Searchlogic
I am unable to call a polymorphic scope using the searchlogic plugin as it keeps on returning ''undefined method''. I am certain it is only a problem within my project as I created a test project and I was able to call a polymorphic scope using the searchlogic plugin. I am hoping someone can provide a suggestion on how to debug this issue. My project consists of several gems, and
2010 May 27
0
Be more discriminating in rescue and wrapping with StatementInvalid
Hi all, I just submitted a patch to 2-3-stable on lighthouse and wanted to bring it to folks general attention. https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/896-be-a-little-more-discerning-about-which-exceptions-to-handle My explanation is a bit long-winded, but here''s the motivation for the patch, as explained in the lighthouse ticket: Perhaps I should open
2008 Apr 04
0
named_scope and ordering
Hi, this is a general design question and I liked to see how other people handle the following situation: Before named_scope I wrote custom finders for my model classes. Something like # order.rb class Order < ActiveRecord::Base class << self def find_all_marked find(:all, :conditions => {:marked => 1}, :order => ''name ASC'') end end end Now
2012 Jan 23
0
Problem loading modules through ActiveSupport on_load
Working with modules to group certain methods. Currently I have this set up and it works: **# app/models/a.rb** class A has_history end **# lib/history.rb** module History module Model def self.included(base) base.send :extend, ClassMethods end module ClassMethods def has_history(options = {}) send :include,
2010 Jan 15
1
Chaining queries in ActiveRecord
Hi all, Stuck at this problem for several days. Tried to use named_scope, scope_out, and plugin such as searchlogic, but no result. The problem is as follows: I have a pic table and tag table, and a join table called pic_tag (with only pic_id and tag_id) so that I can associate N pics to M tags. This is the tutorial way to set up a many- to-many association. I''m trying to implement a
2008 Jun 12
0
named_scope doesn''t check for critical method names.
I just entered this ticket. http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/404-named_scope-bashes-critical-methods It turns out that in an ActiveRecord model like this Model << ActiveRecord::Base named_scope :public private def private_method end public def public_method end end The method public_method will be private because named scope
2010 Sep 14
0
Model with method_missing - rails 3, ruby 1.9.2 raises exception
Say you have two models Post and Author. And Post has_many :authors Finally, method_missing is overridden in Author. Then if you do Post.limit(1).first << Author.limit(1).first You get an exception Author does not define :to_ary Or has there been a change in rails 3 that I have completely overlooked while migrating my app? -- You received this message because you are subscribed to
2013 Mar 28
1
undefined method 'sanitize_limit' for #<ActiveRecord::Relation:0x2aaaad35d720>
I am trying to upgrate rails from 3.0 to 3.1, while updating rails version I am getting following error rake aborted! undefined method `sanitize_limit'' for #<ActiveRecord::Relation:0x2aaaad35d720> /some_package/lib/ruby/gems/1.8/gems/activerecord-3.1.12/lib/active_record/relation.rb:460:in `method_missing''
2010 Nov 03
0
Accessing (updating?) the proxy_scope chain for named_scope (Rails 2.3.x)
I have many named_scopes chained together in the normal way. So far so good. However in a couple of cases where: 1. The named scope is actually a correlated subquery and I need to pass additional scope into it sometimes. 2. Where the presence of a named scope in the chain should change the behaviour of a named_scope later in the chain Given: Product.price.volume.average_discount
2010 Jul 10
0
`method_missing': undefined method `i18n' for #<Rails::Railtie::Configuration:0x000001010fce98>
I have recently upgraqded to Ruby 1.9.2-rc1 and reinstalled rails 3 beta 4 with all the dependencies. I have run bundle install in my rails project. Now I am trying to run some tests... My test_helper.rb file looks like this: # test_helper.rb require ''rubygems'' require ''test/unit'' require ''rails/all'' $ gem list i18n (0.4.1, 0.3.7)
2008 Jun 12
0
Mysterious interaction between RSpec 1.1.4 and has_finder/named_scope
I just opened a Rails ticket on a problem with named_scope in Rails 2.1, and cross-posted a message here which I send to rails-core. I''m still a bit mystified, because I''m having a problem caused by this on RSpec 1.1.4, but not on 1.1.3, and I don''t see a difference in code which would explain it. The basic problem, which I encountered upgrading our rails app to RSpec
2009 Jul 23
11
Problem with named_scope
Here are my scopes: default_scope :order => ''posted_on DESC'', :conditions => { :status => ''visible'' } named_scope :positive, :conditions => { :rating => ''positive'', :status => ''visible'' } named_scope :neutral, :conditions => { :rating => ''neutral'', :status =>
2010 Nov 30
1
rails 3 meta_search usage
I am in the process of upgrading my app from Rails2 to Rails3. My Rails2 app uses searchlogic heavily. After googling i''ve come to know that searchlogic is not compatible with Rails3 and need to use meta_search instead. But i havent quite understood the usage of meta_search vis-a-vis searchlogic. If i have a User model with :name and :address fields, i am not able to use the following
2006 Mar 28
0
MySQL problems and undefined class User
Hello I''m having some issues with MySQL losing it''s connection, or undefined class User on Windows XP. I use Login and UserEngine. Rails 1.0/1.1, MySQL 4. MySQL problem (one of them): Mysql::Error: Lost connection to MySQL server during query: UPDATE sessions SET `data` =
2010 Sep 01
4
deprecation warning in Rails 3 about Base.named_scope
I recently upgraded to Rails 3, and this error has come up ubiquitously: DEPRECATION WARNING: Base.named_scope has been deprecated, please use Base.scope instead. Any ideas on how to get rid of it? Or should I just wait for something? There''s actually no place in my application where the code "Base.named_scope" exists, so I assume the problem is inherent in gems that
2008 Jun 03
1
Custom counter cache
class Category has_many :tracks end class Track belongs_to :category, :counter_cache => true named_scope :converted, :conditions => {:converted => true} named_scope :active, :conditions => {:active => true} end I want to make custom counters for scoped associations, e.g: category.converted_tracks_count category.active_tracks_count And when `track` changes its converted,
2007 Aug 30
0
Method missing error after switching to DRB
I am getting these errors after switchign to dRb: It is trying to call ''add'' on MY SourceListing class, not extended with the ferret indexing methods. Any ideas on where to fix this? I''m combing through the code now. no luck, trying to call class method instead ferret server error undefined method `add'' for SourceListing:Class
2007 Jan 21
6
rake db:migrate "undefined method `default'" error
Hi all, Just starting with Rails and working through the early chapters of the Pragmatic Programmers Agile Development with Rails book (2nd addition). When doing a "rake db:migrate" to add a column to a table I get this: undefined method `default'' for #<ActiveRecord::ConnectionAdapters::MysqlAdapter:0xb7517ec8> Any ideas? thanks, David PS: Here''s the full
2010 Jun 21
3
Improve the Rails Lighthouse overview page
Hello, I have a suggestion to improve the Rails Lighthouse overview page. At present the description is very large. You need to scroll to find the tickets and more importantly the list of pages. I think a shorter description along the lines of http://i48.tinypic.com/2z6a7lt.png would be much better. All the information at present in the description can be moved into pages, and they can be linked