Do not show standard type by default

pull/306/head
Hagen Schink 11 years ago
parent 8cc680d64b
commit b8b22a19ce
  1. 2
      app/controllers/types_controller.rb
  2. 3
      app/models/type.rb

@ -18,7 +18,7 @@ class TypesController < ApplicationController
before_filter :require_admin, :except => [:index, :show, :paginate_planning_element_types]
def index
@types = Type.order('position')
@types = Type.without_standard
.page(params[:page])
.per_page(per_page_param)

@ -56,6 +56,9 @@ class Type < ActiveRecord::Base
:order => "name" }
}
scope :without_standard, conditions: { is_standard: false },
order: :position
def to_s; name end
def <=>(type)

Loading…
Cancel
Save