Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

rails needs hash with the object on key :object #36

wants to merge 2 commits into


None yet
5 participants

jigfox commented Sep 10, 2013

No description provided.


with the actual code, using form_for and this line:

<%= f.country_select :country, { priority: %w(BR), object: f.object } %>

generates a wrong number of arguments (1 for 0) exception.


ghost commented Dec 13, 2013

👍 Had the exact issue above.

I'm currently using the below in my Gemfile right now to get Carmen-Rails to work in Rails 4.0.1 with SimpleForm.

gem 'carmen-rails', '~> 1.0.0', github: 'jigfox/carmen-rails', branch: 'patch-1' 

Please merge this PR and release a new gem!


Did you get the 'State' filed to automatically populate based on the 'country' field selection?
Can you post the relevant code please? (Gemfile, view/partials/JS ?)
Thanks in advance!


ghost commented Dec 13, 2013

Sorry @robsilva no I have not. My application is only using US States right now, so I just wrote a helper to do it outside of any JS.

require 'carmen'

module ApplicationHelper
  include Carmen

  def us_states_for_select
    Country.named('United States').subregions.map{|state| [state.name, state.code]}

bshelton229 commented Jan 9, 2014

I somehow missed this PR before opening #41. #41 should retain Rails 3 compatibility.


jim commented Mar 6, 2014

Closed in favor of #41.

@jim jim closed this Mar 6, 2014

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