search for: unit_types

Displaying 3 results from an estimated 3 matches for "unit_types".

Did you mean: unit_type
2006 Mar 10
2
adding to has_many on create and edit
...lass 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 :action => ''list'' else...
2010 Sep 08
2
dataframe selection using a multi-value key
I am merging two dataframes using a relational key (incident number and incident year), but not all the records match up. I want to be able to review only the records that cannot be merged for each individual dataframe (essentially trying to select records from one dataframe using a multi-value relational key from the other dataframe). The following code shows what I am trying to do. The final
2013 Jan 08
0
[PATCH] avoid undefined behavior in fmt_scaled()
fmt_scaled() computes the absolute value of its argument, and returns an error if the result is still negative (i.e., when the value is LLONG_MIN). However, taking the negative of LLONG_MIN is undefined behavior in C, and some compilers (e.g., gcc-4.7.2) will optimize away the 'abval < 0' check as being always false (since it can only be true with undefined behavior). The patch