Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Rails 3.2.2 Compatibility #2

Open
wants to merge 1 commit into from

2 participants

@jrust

The patch adds Rails 3.2.2 compatibility as well as a gemfile to make it easier to develop locally.

Thanks.

@arronmabrey

@thincloud is this something that you're going to either merge. Or are we to consider this repo dead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 2, 2012
  1. @jrust
This page is out of date. Refresh to see the latest.
View
4 .gitignore
@@ -0,0 +1,4 @@
+*.gem
+.bundle
+Gemfile.lock
+pkg/*
View
4 Gemfile
@@ -0,0 +1,4 @@
+source "http://rubygems.org"
+
+# Specify your gem's dependencies in us-state-select-plugin.gemspec
+gemspec
View
1  Rakefile
@@ -0,0 +1 @@
+require "bundler/gem_tasks"
View
1  init.rb
@@ -1 +0,0 @@
-require 'us_states'
View
5 lib/..rb
@@ -0,0 +1,5 @@
+require "./version"
+
+module .
+ # Your code goes here...
+end
View
9 lib/us-state-select-plugin/version.rb
@@ -0,0 +1,9 @@
+module Us
+ module State
+ module Select
+ module Plugin
+ VERSION = "1.3.0"
+ end
+ end
+ end
+end
View
8 lib/us_states.rb → lib/us_states_select.rb
@@ -1,8 +1,10 @@
+require "us-state-select-plugin/version"
+
module ActionView
module Helpers
module FormOptionsHelper
def us_state_options_for_select(selected = nil, us_state_options = {})
- state_options = ""
+ state_options = "".html_safe
priority_states = lambda { |state| us_state_options[:priority].include?(state.last) }
us_state_options[:show] = :full if us_state_options[:with_abbreviation]
states_label = case us_state_options[:show]
@@ -14,12 +16,12 @@ def us_state_options_for_select(selected = nil, us_state_options = {})
end
if us_state_options[:include_blank]
- state_options += "<option value=\"\">--</option>\n"
+ state_options += "<option value=\"\">--</option>\n".html_safe
end
if us_state_options[:priority]
state_options += options_for_select(US_STATES.select(&priority_states).collect(&states_label), selected)
- state_options += "<option value=\"\">--</option>\n"
+ state_options += "<option value=\"\">--</option>\n".html_safe
end
if us_state_options[:priority] && us_state_options[:priority].include?(selected)
View
22 us-state-select-plugin.gemspec
@@ -0,0 +1,22 @@
+# -*- encoding: utf-8 -*-
+$:.push File.expand_path("../lib", __FILE__)
+require "us-state-select-plugin/version"
+
+Gem::Specification.new do |s|
+ s.name = "us_states_select"
+ s.version = Us::State::Select::Plugin::VERSION
+ s.authors = ["Thincloud", "Jason Rust"]
+ s.email = ["jason@lessonplanet.com"]
+ s.homepage = ""
+ s.summary = %q{State select form helper for Rails}
+ s.description = %q{State select form helper for Rails}
+
+ s.files = `git ls-files`.split("\n")
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
+ s.require_paths = ["lib"]
+
+ # specify any dependencies here; for example:
+ # s.add_development_dependency "rspec"
+ # s.add_runtime_dependency "rest-client"
+end
Something went wrong with that request. Please try again.