english_county_select 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
File without changes
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
@@ -7,7 +7,7 @@ module ActionView
7
7
  InstanceTag.new(object, method, self, options.delete(:object)).to_english_county_select_tag(priority_counties, options, html_options)
8
8
  end
9
9
  # Returns a string of option tags for pretty much any english_county in the world. Supply a english_county name as +selected+ to
10
- # have it marked as the selected option tag. You can also supply an array of countries as +priority_counties+, so
10
+ # have it marked as the selected option tag. You can also supply an array of counties as +priority_counties+, so
11
11
  # that they will be listed above the rest of the (long) list.
12
12
  #
13
13
  # NOTE: Only the option tags are returned, you have to wrap this call in a regular HTML select tag.
@@ -22,10 +22,10 @@ module ActionView
22
22
 
23
23
  return (english_county_options + grouped_options_for_select(COUNTIES, selected)).html_safe
24
24
  end
25
- # All the countries included in the english_county_options output.
26
- COUNTIES = [ ["England", ["Avon", "Bedfordshire", "Berkshire", "Buckinghamshire", "Cambridgeshire", "Cheshire", "Cleveland", "Cornwall", "Cumbria", "Derbyshire", "Devon", "Dorset", "Durham", "East Sussex", "Essex", "Gloucestershire", "Hampshire", "Herefordshire", "Hertfordshire", "Isle of Wight", "Kent", "Lancashire", "Leicestershire", "Lincolnshire", "London", "Merseyside", "Middlesex", "Norfolk", "Northamptonshire", "Northumberland", "North Humberside", "North Yorkshire", "Nottinghamshire", "Oxfordshire", "Rutland", "Shropshire", "Somerset", "South Humberside", "South Yorkshire", "Staffordshire", "Suffolk", "Surrey", "Tyne and Wear", "Warwickshire", "West Midlands", "West Sussex", "West Yorkshire", "Wiltshire", "Worcestershire"]], ["Wales", ["Clwyd", "Dyfed", "Gwent", "Gwynedd", "Mid Glamorgan", "Powys", "South Glamorgan", "West Glamorgan"] ], ["Scotland", ["Aberdeenshire", "Angus", "Argyll", "Ayrshire", "Banffshire", "Berwickshire", "Bute", "Caithness", "Clackmannanshire", "Dumfriesshire", "Dunbartonshire", "East Lothian", "Fife", "Inverness-shire", "Kincardineshire", "Kinross-shire", "Kirkcudbrightshire", "Lanarkshire", "Midlothian", "Moray", "Nairnshire", "Orkney", "Peeblesshire", "Perthshire", "Renfrewshire", "Ross-shire", "Roxburghshire", "Selkirkshire", "Shetland", "Stirlingshire", "Sutherland", "West Lothian", "Wigtownshire"] ], ["Northern Ireland", ["Antrim", "Armagh", "Down", "Fermanagh", "Londonderry", "Tyrone"] ] ] unless const_defined?("COUNTIES")
25
+ # All the counties included in the english_county_options output.
26
+ COUNTIES = [ ["England", [ "Avon", "Bedfordshire", "Berkshire", "Borders", "Bristol", "Buckinghamshire", "Cambridgeshire", "Channel Islands", "Cheshire", "Cleveland", "Cornwall", "Cumbria", "Derbyshire", "Devon", "Dorset", "Durham", "East Riding of Yorkshire", "East Sussex", "Essex", "Gloucestershire", "Greater Manchester", "Hampshire", "Herefordshire", "Hertfordshire", "Humberside", "Isle of Man", "Isle of Wight", "Isles of Scilly", "Kent", "Lancashire", "Leicestershire", "Lincolnshire", "London", "Merseyside", "Middlesex", "Norfolk", "North Yorkshire", "Northamptonshire", "Northumberland", "Nottinghamshire", "Oxfordshire", "Rutland", "Shropshire", "Somerset", "South Yorkshire", "Staffordshire", "Suffolk", "Surrey", "Tyne and Wear", "Warwickshire", "West Midlands", "West Sussex", "West Yorkshire", "Wiltshire", "Worcestershire" ] ], ["Wales", [ "Blaenau Gwent", "Bridgend", "Caerphilly", "Cardiff", "Ceredigion", "Conwy", "Denbighshire", "Flintshire", "Gwynedd", "Isle of Anglesey", "Merthyr Tydfil", "Monmouthshire", "Neath Port Talbot", "Newport", "Pembrokeshire", "Powys", "Rhondda Cynon Taff", "Swansea", "The Vale of Glamorgan", "Torfaen", "Wrexham" ] ], ["Scotland", [ "Aberdeen City", "Aberdeenshire", "Angus", "Argyll and Bute", "Armagh", "Carmarthenshire", "Clackmannan", "Dumfries and Galloway", "East Ayrshire", "East Dunbartonshire", "East Lothian", "East Renfrewshire", "Edinburgh City", "Falkirk", "Fife", "Glasgow", "Highland", "Inverclyde", "Midlothian", "Moray", "North Ayrshire", "North Lanarkshire", "Orkney", "Perthshire and Kinross", "Renfrewshire", "Roxburghshire", "Shetland", "South Ayrshire", "South Lanarkshire", "Stirling", "West Dunbartonshire", "West Lothian", "Western Isles" ] ], ["Northern Ireland", [ "Antrim", "Down", "Fermanagh", "Londonderry", "Tyrone" ] ] ] unless const_defined?("COUNTIES")
27
27
  end
28
-
28
+
29
29
  class InstanceTag
30
30
  def to_english_county_select_tag(priority_counties, options, html_options)
31
31
  html_options = html_options.stringify_keys
@@ -39,7 +39,7 @@ module ActionView
39
39
  )
40
40
  end
41
41
  end
42
-
42
+
43
43
  class FormBuilder
44
44
  def english_county_select(method, priority_counties = nil, options = {}, html_options = {})
45
45
  @template.english_county_select(@object_name, method, priority_counties, options.merge(:object => @object), html_options)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: english_county_select
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,16 +9,16 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2009-11-28 00:00:00.000000000 Z
12
+ date: 2013-01-08 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Rails select helper for English Counties
15
15
  email: bobak.art@gmail.com
16
16
  executables: []
17
17
  extensions: []
18
18
  extra_rdoc_files:
19
- - README
19
+ - README.md
20
20
  files:
21
- - README
21
+ - README.md
22
22
  - VERSION
23
23
  - init.rb
24
24
  - lib/english_county_select.rb
@@ -43,7 +43,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
43
43
  version: '0'
44
44
  requirements: []
45
45
  rubyforge_project:
46
- rubygems_version: 1.8.24
46
+ rubygems_version: 1.8.25
47
47
  signing_key:
48
48
  specification_version: 3
49
49
  summary: Rails select helper for English Counties