search for: maggotchild

Displaying 7 results from an estimated 7 matches for "maggotchild".

2009 Sep 23
5
Overriding AR read/write_attribute - Overridden write_attribute Is Never Called
Could someone explain this? #config/initializers/ar_attributes.rb module ActiveRecord module AttributeMethods alias_method :ar_read_attribute, :read_attribute def read_attribute(attr_name) p "read_override" ar_read_attribute(attr_name) end alias_method :ar_write_attribute, :write_attribute def write_attribute(attr_name, value)
2009 Oct 08
6
Eager Loading a Relationship That Has No PK/FK
I''m attempting to wrestle an old DB into Rails. This relationship is giving me trouble: class Show < AR::Base has_many :segments end class Segment < AR::Base belongs_to :show has_one :media #this has no PK/FK relation end A Segment is "linked" to Media by Media.name, which is the result of concatenating Segment.name and Segment.part. As I said there are is no
2009 Feb 02
9
ActiveRecord Unexplainable SystemStackError - Only in WEBrick
This SystemStackError is driving me crazy. It only takes place when testing with WEBrick - I can''t reproduce it with any tests. It is caused by calling the "missing" id method (base.rb:2435) on my ActiveRecord class. WEBrick and my tests are running as the same user, with a `ulimit -s` of 10240. Plus the query works sometimes so I don''t think this matters.
2009 Jan 12
0
url_for, routes, and the current url
I need to generate 2 types of URL and have defined my routes as: map.country_yes "/:country/ yes", :controller=>"posts", :action=>"country", :yes=>true map.country_no "/:country/ no", :controller=>"posts", :action=>"country", :yes=>false map.yes "/yes", :controller=>"posts",
2009 May 03
0
HTTP Auth 401 Even on Valid Login
I can''t understand why authenticate_or_request_with_http_basic keeps failing even though I am entering the correct info. If I try to access /admin/items/new, I enter the correct info but I keep getting prompted. The strange part is that when I cancel out, I get "HTTP Basic: Acce". Here''s the controllers: class Admin::BaseController < ApplicationController
2009 Dec 04
0
db:test:purge And osql: What Happened?
I thought I had read somewhere why db:test:purge continues to use `osql` but all I could find is this: http://dev.rubyonrails.org/ticket/7054 Obviously this never made its way into Rails. Why? What are people doing for MS SQL testing on non Windows OS''? Everyone''s hacking their own workaround? Seems as if there would be a universal antidote. -- You received this message
2009 Dec 29
0
Using current_page? With An Edit Route
current_page?(:action => ''edit'', :controller => ''admin/products'') fails with an ActionView::TemplateError (No route matches ...) unless I''m in the edit action or I provide the :id. Route: /admin/products/:id/edit(.:format) {:action => ''edit'', :controller => ''admin/products''} I understand why this