Skip to content

Instantly share code, notes, and snippets.

@a2f0
Created March 10, 2017 15:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save a2f0/9c4e88d020e4a1e9fd4d15486522fda2 to your computer and use it in GitHub Desktop.
Save a2f0/9c4e88d020e4a1e9fd4d15486522fda2 to your computer and use it in GitHub Desktop.
<% if @asset.billable_entity.nil? || @asset.billable_entity.user.fas_accounts_users.count == 0 %>
<div class="form-group">
<select class='form-control' id='_fas_accounts_users_id'>
<option value="">None</option>
</select>
</div>
<% else %>
<%= f.collection_select(:fas_accounts_users_id, @asset.billable_entity.user.fas_accounts_users, :id, :serialize_details, :include_blank => 'None', hide_label: true, :selected => @asset.fas_accounts_user_id) %>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment