Skip to content

Instantly share code, notes, and snippets.

@neilsmind
Created August 27, 2012 02:14
Show Gist options
  • Save neilsmind/3485047 to your computer and use it in GitHub Desktop.
Save neilsmind/3485047 to your computer and use it in GitHub Desktop.
Making carmen 1.x work with Formtastic (file under app/lib in my app)
class CountryInput < Formtastic::Inputs::CountryInput
def to_html
raise "To use the :country input, please install a country_select plugin, like this one: https://github.com/jamesds/country-select" unless builder.respond_to?(:country_select)
input_wrapping do
label_html <<
builder.country_select(method, priority_countries, input_options)
end
end
def priority_countries
options[:priority_countries] || {priority: ['US','CA']}
end
end
@staycreativedesign
Copy link

Have you gotten the subregions to work with active admin and carmen?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment