This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Javascript | |
function update_versions_div(project_id) { | |
jQuery.ajax({ | |
url: "/update_versions", | |
type: "GET", | |
data: {"project_id" : project_id}, | |
dataType: "html" | |
success: function(data) { | |
jQuery("#versionsDiv").html(data); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
accepts_nested_attributes_for :tour_irregular_schedules, | |
allow_destroy: true, reject_if: proc { |a| a["start_date"].blank? && a['all_season_flg'].blank? } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function(){ | |
$("a[shp-action=add_field_need_things]").click( function(){ | |
var num = $("ul[shp-role=dynamic_field_need_things]").length + 1; | |
var new_element = []; | |
new_element.push( | |
'<ul class="inline nested-fields" shp-role="dynamic_field_need_things" id="', num, '">', | |
'<li>', | |
'<input class="input-mini" id="', num, '" name="need_things" shp-role="dynamic_field_need_things" type="text" />', | |
'</li>\n', | |
'<li><a id="', num, '" shp-role="delete_field_need_things">×</a> </li>', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var new_element = []; | |
new_element.push( | |
'<ul class="inline nested-fields" shp-role="dynamic_field_need_things" id="', num, '">', | |
'<li>', | |
'<input class="input-mini" id="', num, '" name="need_things" shp-role="dynamic_field_need_things" type="text" />', | |
'</li>\n', | |
'<li><a id="', num, '" shp-role="delete_field_need_things">×</a> </li>', | |
'</ul>' | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Created by Luu Tuan Anh, OKWave Inc. | |
function git_prompt_info_short() { | |
if [[ "$(git config --get oh-my-zsh.hide-status)" != "1" ]]; then | |
ref=$(command git symbolic-ref HEAD 2> /dev/null) || \ | |
ref=$(command git rev-parse --short HEAD 2> /dev/null) || return | |
ref="${ref#refs/heads/}" | |
if echo "$ref" | egrep "feature" > /dev/null; then | |
ref="f/${ref#feature/}" | |
fi | |
if echo "$ref" | egrep "release" > /dev/null; then |