muck-engine 0.2.27 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.27
1
+ 0.3.0
@@ -113,6 +113,14 @@ class MuckCustomFormBuilder < ActionView::Helpers::FormBuilder
113
113
  end
114
114
  end
115
115
 
116
+ # creates a select control with us states. Default id is 'us_states'. If 'retain' is passed for the class value the value of this
117
+ # control will be written into a cookie with the key 'us_states'.
118
+ def us_state_select(method, options = {}, html_options = {}, additional_state = nil)
119
+ @@country_id ||= Country.find_by_abbreviation('US')
120
+ @states = (additional_state ? [additional_state] : []) + State.find(:all, :conditions => ["country_id = ?", @@country_id], :order => "name asc")
121
+ self.menu_select(method, I18n.t('muck.engine.choose_state'), @states, options.merge(:prompt => I18n.t('muck.engine.select_state_prompt'), :wrapper_id => 'us-states-container'), html_options.merge(:id => 'us-states'))
122
+ end
123
+
116
124
  # creates a select control with states. Default id is 'states'. If 'retain' is passed for the class value the value of this
117
125
  # control will be written into a cookie with the key 'states'.
118
126
  def state_select(method, options = {}, html_options = {}, additional_state = nil)
data/muck-engine.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{muck-engine}
8
- s.version = "0.2.27"
8
+ s.version = "0.3.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Justin Ball", "Joel Duffin"]
12
- s.date = %q{2010-01-20}
12
+ s.date = %q{2010-01-21}
13
13
  s.description = %q{The base engine for the muck system. Contains common tables, custom for, css and javascript.}
14
14
  s.email = %q{justin@tatemae.com}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: muck-engine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.27
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Ball
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2010-01-20 00:00:00 -07:00
13
+ date: 2010-01-21 00:00:00 -07:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency