search for: adminunitscontrol

Displaying 1 result from an estimated 1 matches for "adminunitscontrol".

2006 Mar 10
2
adding to has_many on create and edit
..._price, :class_name => "Price", :order => ''created_at DESC'' end ----------- The has_one :most_recent_price lets me grab the most recent price for display and comparison purposes. I can currently accomplish my aims in the controller like so: ----------- class AdminUnitsController < ApplicationController #snip def create @unit = Unit.new(params[:unit]) @unit.prices.create("price" => params[:price]) @levels = Level.find(:all, :order => "LPAD (`levels`.`elevator_number`,5,\"0\") ASC") @unit_types = UnitType....