similar to: Base class model not found, even with require

Displaying 20 results from an estimated 8000 matches similar to: "Base class model not found, even with require"

2007 Sep 24
3
Trouble using backgroundrb
Hi all, I''m a newbie to backgroundrb and am having trouble integrating it into my rails-app. I''m using namespaces to differentiate between the parts of my app. When I want to create a new worker, it seems that it cannot find the worker object. Here''s my code: -------------------- controller app/passwd/index -------------------- class Passwd::IndexController <
2006 May 31
1
Help enhancing acts_as_nested_set
I''m trying to enhance acts_as_nested_set. Well actually I already have, but I''ve done a hack up job of it. I would like to contribute these enhancements back, but I need a little help. I''m a complete newbie to this stuff. The only thing I new before coming into this project was vanilla HTML. So over the course of two weeks I''ve picked up Ruby, Rails, MySQL,
2010 Nov 24
0
Surprise in (delete_all | clear | destroy_all) on association
Hi, I was very surprised by difference of delete_all on association vs model(delegated to relation). Given TaskFilter.has_many(:qualifiers, :class_name=>''TaskFilterQualifier'') TaskFilter.delete_all => one DELETE statement Without :dependent option on "qualifiers" association TaskFilter.first.qualifiers.delete_all => SELECT `task_filter_qualifiers`.* FROM
2006 May 16
0
Possible bug: ActiveRecord::Base::has_many fails for String arguments.
Hi I''ve noticed ActiveRecord::Base::has_many fails for String arguments. The following code works when all arguments to the ActiveRecord::Base::has_many calls are Symbols: class Country < ActiveRecord::Base has_many :country_products, :dependent => true has_many :products, :through => :country_products end ruby script/console >> Country.find_all.first.products
2006 May 31
3
class does not inherit (?) ActionRecord::Base
Hi. I''m a newbie at this, so please bear with me. I have several classes which model several corresponding tables. All of them seem to work except one. I have not made many modifications from the scaffold templates. However, with one class, Log, all methods give me the following type of error NoMethodError in LogController#create undefined method `save'' for
2006 Mar 29
2
delete_all not resetting auto incement in database
Hey I''m writing a simple admin interface thats reading user data (skills) from a comma separated file. To clear the database before inserting new skills, I use Skill.delete_all Then I insert the new values I read from a file. Everything goes well up to the point where I see that auto-generated ID''s are not starting from 1. They start off at 840 (responding to the number of
2006 May 17
0
teardown not cleaning the BD?
Hi, I am a bit confused, I have a few functionnal tests were I add/delete records on top of the ones provided in the fixture and it seems like the records are surviving the teardown. Isnt teardown supposed to be ran after each test? So if I have something like: def teardown Client.delete_all Concept.delete_all Variation.delete_all ClientVariation.delete_all end All the
2006 Jan 04
3
ActiveRecord delete_all With Sanitized Parameters?
Hi there I''m trying to delete a set of active record objects based on certain conditions. I''d like to do something like the following: Context.delete_all("uri IN (?)", uris) But delete_all doesn''t allow multiple arguments. Since I don''t have the IDs for the objects I want to delete, I can''t use delete(id), and have resorted to this,
2006 Jul 26
7
Delete_all causes a deadlock on MSSQL database ???
Hi all, When i use the ''delete_all'' function to remove a few rows from my database, it causes a deadlock on the sql server. The delete seems to be successful, it then redirects to the ''view'' page, and the record does appear to be deleted as far as the ''view'' rails page shows. BUT if i go into sql query analyser, i can''t do a
2008 Apr 23
0
self referential (n-n relationship) belongs many controller
Hi all, I ve some troubles in my small acpplication (only 2 tables). I want to follow up tasks but these tasks are linked to others tasks. So I ve tried to do store the nn relationship in other table called links 1st table : tasks columns : id | infos neutral... (as title, description etc ...) ----------------------------------------------------------------------------------- model : class
2007 Jan 23
2
Understanding :dependent => :delete_all?
I can''t see what''s wrong here but that''s probably just because I''m so new to Rails! To get right into it... I have 4 tables that look like this: Sites - id Projects - id - site_id - user_id Tasks - id - project_id - user_id Users - id The corresponding models: class Site < ARB has_many :projects, :dependent => :delete_all end class Project <
2009 Oct 14
0
[PATCH server] hack betternested set to enable pool deletion
This is an ugly hack to fix the betternestedset plugin as currently a bug does not allow pools to be deleted. The single line commented out in this patch deletes the pool itself instead of only its children for whatever reason. This wouldn't be a problem were it not for the recent change to active record which enforces optimistic locking upon destroy operations. Since the database record is
2007 Jan 25
1
has_and_belongs_to won't delete records
Hi, I have a has_and_belongs_to relationship between 2 objects, order and product. I''m getting a foreign key violation when trying to delete Order. Is there a special way of deleting orders without deleting products? ("has_many" has :dependant => :delete_all.... does "has_and_belongs_to" have something similar) Trying: Order.delete_all Getting: Mysql::Error:
2008 May 28
2
functional testing joins table problem
I have models/controllers Class Facility has_many :facilities_services, :dependent => :delete_all Class Service has_many :facilities_services, :dependent => :delete_all Class FacilitiesServices belongs_to :facility belongs_to :service so in my test/functional/facilities_controller_test.rb, I have post :destroy, :id => 5 which tosses an error...
2006 Jan 05
0
I found a way to dynamically switch languages in your rails app -- look at it and give your opinions
step 1) Do what is there in the manual Using Gettext To Translate Your Rails Application as it is. Step2)Now create a table in your project database to store your language names which you are supporting in the project for example "langs" step 3)populate your table with language names, namely hindi, japanes etc. step 4) create a scffold for with aLang controller, just so that life is
2006 Jan 05
0
I found a way to dynamically switch languages in your railsapp -- look at it and give your opinions
can you share the code so that others can benefit out of it??? silvy mathews ________________________________ From: rails-bounces@lists.rubyonrails.org [mailto:rails-bounces@lists.rubyonrails.org] On Behalf Of sekhar Sent: Thursday, January 05, 2006 7:14 AM To: rails@lists.rubyonrails.org Subject: [Rails] I found a way to dynamically switch languages in your railsapp -- look at it and give
2006 Jan 26
3
global objects?
Forgive the term global if that''s not applicable in rails (i come from a php background) I have a browse controller with a couple of different methods def method1 @properties = Property.find_all #other stuff for that method end def method2 @properties = Property.find_all #other stuff for that method end def method3 @properties = Property.find_all #other stuff for that method end I
2008 Mar 21
1
IMAP creates .userid directory even after pop.
We are currently running dovecot-1.0.10 on Solaris 10 x86. Several users has noticed that they get different emails when using pop vs using IMAP. When I check a user's home directory, I find the following situation: /nfs/mail/1/1/hiro.11/mail/: drwx------ 6 176785 1000 512 Mar 21 07:53 . drwxr-xr-x 3 176785 1000 512 Feb 29 17:01 .. drwx------ 5 176785 1000
2006 Jul 09
8
find_all order question
How does one properly get find_all to grab the data from the DB table ordered by a specific column? For example: @anglers = Angler.find_all This code gets all the angler records and they are sorted in order of the id field which is of course set as a primary key in the DB (mysql). I''d really like to pull the data from the DB sorted in the order of another field, for example
2006 Mar 08
1
Nil Object Error
I''m a complete newbie when it comes to Ruby on Rails. I have lots of experience in PHP, but yesterday was the first time I sat down and began developing using Ruby on Rails (I''m impressed!). Anyway, I''m having a problem with edit/update of records when using form validation. Here are my files for reference. ticket.rb ============ class Ticket <