similar to: problems overriding module with plugin

Displaying 20 results from an estimated 5000 matches similar to: "problems overriding module with plugin"

2006 Feb 03
2
acts_as_tree counter_cache behavior is different than API docs
Before I file a ticket, I''ll query ya''ll about this: The API docs for acts_as_tree''s counter_cache is to create a database column called "children_count" to hold the counter_cache. I have enabled this option in my model. While writing tests I wrote a test for creating children from the a parent: message = @forum_message["parent"].find child =
2006 Jan 20
6
Pre-populate db with yaml outside of testing?
Hi. What is the best way to pre-populate your database with records while developing, not testing? For example, I want to: 1) > [run this command to populate db] 2) > ruby script/server 3) now I can surf to localhost:3000 and my app will already have relevant data I''m hoping to use yaml to suck it in. Is there a way to use the Fixture class to handle this even though this is
2006 Feb 20
1
belongs_to, has_one, has_many question (again?)
Hi All, Probably this has been asked numerous times, I apologize already! Can somebody point me to a good tutorial on how Rails works with relations? I know about database design and normalization, I also know about programming in general (and OOP for that matter). Only thing I can say is that I''m following the "Four days on Rails" tutorial by John McCreesh. He writes
2006 Mar 13
1
adding custom cache field
Hello, I needed to add custom cache field for one of my application. I thought I will share the code showing how to do this. This code below creates and maintain a custom cache field, for keeping track of totals. Say, you have accounts, and for each account there are transactions (either deposit/withdrawal), and one will like to keep track of the total balance for an account. So, let there be a
2006 Jan 27
5
Before I write this myself, is there already an easier way?
Recently I''ve wanted to be able to take the data I''ve painstakingly defined in my fixture files and slurp it up into my development database so I can play with my website (locally, in development mode) with the same data I use in my tests. In a similar vein, I want to take the table definitions in the development_structure.sql file and use it to re-define my development
2006 Jan 31
4
A dumb question on extracting a value from a hash
Hi, I have the following code fragment; @comm_type = Communication.find_by_sql(''select id from communication_types where upper(description) = "EMAIL"'') Which results in >> @comm_type => [#<Communication:0x39a0f60 @attributes={"id"=>"4"}>] But when I try to test an ActiveREcord against this it doesn''t work;
2006 Jan 31
11
ez_where plugin updated features.
Friends- I wanted to let people know that there is a new experimental release of this plugin. I would love feedback on syntax and features. There is now a full test suite with fixtures that covers all the available syntax. Look at the test suite for more syntax possibilities. There have been many additions since my last release. Fabien Atelier has been working on this with me and has
2006 Jan 04
11
Query Mixin by Duane Johnson
Hello At the start of October, Duane Johnson announced the Query mixin plugin on this list. The code was attached to the announcement email. Unfortunately, I''ve not been able to locate the attached code. Goggle has not helped me this time. Could somebody forward it to me? Thanks in advance Harvey This e-mail has been scanned for all viruses by MessageLabs.
2007 Aug 27
7
Foreign key constraints, fixtures, and rake task
I''ve got a spec that loads a fixture in the "before" block. This works fine running scripts/spec, but when I run rake spec instead, I get: ActiveRecord::StatementInvalid in ''User in fixture :quentin with an IM service but no IM name should be invalid'' Mysql::Error: Cannot delete or update a parent row: a foreign key constraint fails
2006 Feb 01
7
Explanation of "alias_method"
Hi! I''m trying to extend ActiveRecord''s find method (Rails 1.0, Ruby 1.8.2), but I recognize a strange behaviour of the "alias_method" call. I wrote a very simple script to explain my problem: ------------------------------------------------------ module ActiveRecordExtension def self.included(base) base.extend(ClassMethods) base.class_eval do
2006 Feb 24
6
[JOB] at yakimaherald.com
Friends- I have taken a new job and will be moving at the end of March. The newspaper I currently work for is looking for someone to take my place. I have really enjoyed working here. It is a great environment with very nice people to work with. And the best part is you get to develop in Ruby and Rails, for everything! The paper is willing to accept applications from people who would
2006 Feb 15
10
STI Question
Hi everyone, I have 3 types of people (for now): Staff Faculty Students To break them up into classes, but keep them in the same People table, I''ve broken them up like so (code and ''ends'' snipped): class Person < ActiveRecord::Base class Employee < Person class Staff < Employee class Faculty < Employee class Student < Employee So, when I insert
2006 Feb 27
3
Send parameter along with method in before_filter
Hello list, I have an app that has a very simple authorization scheme. A person can have many roles and roles can have many people. In my app, I''d like to do before_filter :login_required (since no role name is provided, it accepts any users with credentials) before_filter :login_required ("administrator") (only accepts those with role administrator) before_filter
2006 Jan 23
8
OT: Problem rotating logs with lighttpd
Hi everybody, this is a little OT. We are using Lighttpd as a webserver for Rails. Our problem is that when we rotate the logs everyday at the end of the process, lighttpd stops writing the logs. To solve this we have to restart the server manually each time. We use a common Debian, lighttpd-1.4.7, Rails 1.0 and fcgi-2.4.0. I have tracked the lighttpd bugs, and I haven''t found
2006 Jan 06
8
How do I write a generator?
I''d like to take some advice and write a generator to change the scaffold.css. How do I do that? I looked on the wiki and googled it but have not found anything yet. Any help would be much appreciated. bruce
2006 Jan 01
11
Migration db_schema_import always fails.
I have not been able to get DB migrations to work at all in Rails 1.0 for me. On multiple platforms I continually get the same errors. It took me awhile to figure out some initial things, such as Migrations don''t seem to support Enum column types, and doesn''t really support Foreign key relationships (the constraints at least). After changing my DB schema to jive more with the
2006 Feb 28
5
List and update installed gems?
Hi, could someone tell me how to list and update the currently installed gems on my rails installation? Thanks in advance, -Conrad
2006 Feb 15
36
Rubuntu Live CD for Rails
Friends- I am almost finished with a custom live cd called Rubuntu ;-) This is an ubuntu live cd variant that comes preloaded with ruby and rails developers in mind. I already have it working with all the basics but I was wondering what extras people would like to see on this distro. What editors with what configurations? What other tools do people really like for rails development on a
2005 Dec 28
8
Rails app lags after inactivity
Hi all. I have two Rails applications. Each is on its own VPS hosted by Pipespring (excellent service btw). My app runs lightning quick - AFTER the first load. If I visit my site after a period of inactivity (i.e. no visitors to my site), it takes up to 10 seconds to load that first time. After that I can hop around with no problems. Has anyone run into this before? Ideas? - Rabbit
2005 Dec 29
5
help with installing login_engine
Hello, I did a script/plugin discover then script/plugin engine then script/plugin login_engine The discover worked, but I get engine and login_engine not found. I am using a Mac Thanks Frank