Skip to content

Instantly share code, notes, and snippets.

@guipdutra
Created June 12, 2013 14:53
Show Gist options
  • Save guipdutra/5765998 to your computer and use it in GitHub Desktop.
Save guipdutra/5765998 to your computer and use it in GitHub Desktop.
<%= f.input :code %>
<%= f.input :title %>
<% locked_field = params[:locked_fields].try(:include?, "with_bank_account") %>
<%= f.input :with_bank_account, :as => :select, :required => false, :hint => false, :disabled => locked_field %>
<% if locked_field %>
<%= f.input :with_bank_account, :as => :hidden %>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment