Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Rails 3.2.2 Compatibility #2

Open
wants to merge 1 commit into from

2 participants

Jason Rust Arron Mabrey
Jason Rust

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

Thanks.

Arron Mabrey

@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. Jason Rust
This page is out of date. Refresh to see the latest.
4 .gitignore
View
@@ -0,0 +1,4 @@
+*.gem
+.bundle
+Gemfile.lock
+pkg/*
4 Gemfile
View
@@ -0,0 +1,4 @@
+source "http://rubygems.org"
+
+# Specify your gem's dependencies in us-state-select-plugin.gemspec
+gemspec
1  Rakefile
View
@@ -0,0 +1 @@
+require "bundler/gem_tasks"
1  init.rb
View
@@ -1 +0,0 @@
-require 'us_states'
5 lib/..rb
View
@@ -0,0 +1,5 @@
+require "./version"
+
+module .
+ # Your code goes here...
+end
9 lib/us-state-select-plugin/version.rb
View
@@ -0,0 +1,9 @@
+module Us
+ module State
+ module Select
+ module Plugin
+ VERSION = "1.3.0"
+ end
+ end
+ end
+end
8 lib/us_states.rb → lib/us_states_select.rb
View
@@ -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)
22 us-state-select-plugin.gemspec
View
@@ -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.