Displaying 1 result from an estimated 1 matches for "elevator_numb".
Did you mean:
elevator_name
2006 Mar 10
2
adding to has_many on create and edit
...ish 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.find(:all, :order => "`unit_types`.`name`
ASC")
if @unit.save
Unit.find(@unit.id).update_attributes(params[:unit])
flash[:notice] = ''Unit was successfully created.''
redirect_to :a...