Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Select-tag add link
<%= select_tag 'team_id', options_from_collection_for_select(@teams, "id", "name") %>
<script>
$(function(){
$('#team_id').bind('change', function () {
var url = "/Teamleader/" + $(this).val()
if (url) {
window.location.replace(url);
}
return false;
});
});
</script>
= select_tag :frame, options_for_select(get_frames, :id), class: 'chosen-select form-control', prompt: 'Çerçeve seçiniz'
$ ->
$('#frame').bind 'change', ->
url = '/admin/blocks?frame_id=' + $(this).val()
if url
window.location.replace url
false
@leylaKapi

This comment has been minimized.

Copy link
Owner Author

leylaKapi commented Oct 2, 2017

You can select one method. Because above files solved same issue for select-tag

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.