Class: Province
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Province
- Defined in:
- lib/forge/app/models/province.rb
Class Method Summary collapse
Class Method Details
.options_for_select(options = {}) ⇒ Object
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/forge/app/models/province.rb', line 17 def self.(={}) [:add_blank] ||= false text_for_blank = [:text_for_blank] || "All" provinces = Province.all.collect { |p| [p.title, p.id] } if [:add_blank] provinces.unshift [text_for_blank, 0] end provinces end |