Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes #3071 - OS edit failed on foreign keys since config_template_id was '0' on blank #882

Closed

Conversation

isratrade
Copy link
Member

No description provided.

@isratrade
Copy link
Member Author

The previous code passed config_template_id => '0' if selectbox was blank. Not is it null, so the following code below works.

  accepts_nested_attributes_for :os_default_templates, :allow_destroy => true,
    :reject_if => lambda { |v| v[:config_template_id].blank? }

@domcleal
Copy link
Contributor

@domcleal
Copy link
Contributor

Merged as f76e5ee, thanks @isratrade!

@domcleal domcleal closed this Sep 16, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants