when i use label_method with a block will disable the disabled options #307

Closed
tjcjc opened this Issue Aug 29, 2011 · 1 comment

Comments

Projects
None yet
3 participants

tjcjc commented Aug 29, 2011

f.association :pages, :label_mthod => {|x| "label:#{x.name}"}, :disabled => {|x| x.archived?}

when the label_method is a block will overwrite the collection_select method,
and change the collection's element from object to array,
so the disabled's block will raise an error because undefined method archived for an array

Collaborator

rafaelfranca commented Aug 29, 2011

Thanks for your reporting. We will look to this issue soon. If you want to help, could you provide one application example, failing tests or a pull request?

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