'verb'! do |success, failure| is only for verbs create, update, destroy #146

merged 1 commit into from Dec 20, 2012

2 participants


This is incorrect usage of inherited_resources bang verbs. The index! resource requires a block with one argument. Ruby 1.8 silently ignores this, but Ruby 1.9 gets very upset. Only create!, update!, and destroy! may take blocks with arity 2.

@sodabrew 'verb'! do |success, failure| is only for verbs create, update, destr…
…oy; everything else must use 'verb'! do |format|.

For search index posterity, the error this resolves is "uninitialized constant Mime::TO_ARY" (Google that string with quotes, and just one IRC thread about this perplexing error in puppet-dashboard comes up in the search results).


Finished in 44.058365 seconds

527 examples, 0 failures

@sodabrew sodabrew merged commit dd44529 into sodabrew:master Dec 20, 2012
@sodabrew sodabrew deleted the sodabrew:patch-3 branch Dec 21, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment