search for: metered_service

Displaying 2 results from an estimated 2 matches for "metered_service".

Did you mean: metered_services
2011 Mar 01
6
render :collection calling partial with phantom object?
I have two models with a straightforward has_many / belongs_to relationship: class Premise < ActiveRecord::Base has_many :metered_services, :dependent => :destroy ... end class MeteredService < ActiveRecord::Base belongs_to :premise ... end and nested routes to match: Demo::Application.routes.draw do devise_for :users resources :premises do resources :metered_services end ... end I want to show/edit the me...
2010 Apr 20
13
why is ActiveRecord tying to select nonex ID column?
...n about views or controllers.) So the schema and the model: ========== create_table "metered_usages", :id => false, :force => true do |t| t.integer "start_time_id" t.integer "end_time_id" t.integer "service_address_id" t.integer "metered_service_id" t.float "quantity" t.float "cost" end ========== class MeteredUsage < ActiveRecord::Base belongs_to :start_time, :class_name => ''TimeDimension'', :foreign_key => ''start_time_id'' belongs_to :end_time, :class_n...