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
cap staging foreman:setup | |
DEBUG [b77dc6fe] Running ~/.rvm/bin/rvm version on 162.243.255.230 | |
DEBUG [b77dc6fe] Command: ~/.rvm/bin/rvm version | |
DEBUG [b77dc6fe] | |
DEBUG [b77dc6fe] rvm 1.25.25 (master) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/] | |
DEBUG [b77dc6fe] | |
DEBUG [b77dc6fe] Finished in 2.093 seconds with exit status 0 (successful). | |
rvm 1.25.25 (master) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/] | |
DEBUG [9b4d75a0] Running ~/.rvm/bin/rvm current on 162.243.255.230 |
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
require 'oj' | |
# Macro in model: | |
# serialize :payload, ActiveSupport::OJSON | |
# | |
# payload is a text data type in postgres | |
# | |
module ActiveSupport | |
module OJSON | |
class << self |
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
-- drop_table(:users) | |
-> 0.0156s | |
-- create_table(:users) | |
-> 0.0034s | |
-- add_index(:users, :preferences, {:using=>:gin}) | |
-> 0.0040s | |
-- initialize_schema_migrations_table() | |
-> 0.0207s | |
#=> Ruby 2.2.0 | |
#=> ActiveRecord 4.2.0 |
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
<h3>Reasons (<%= add_reason_link t(:action_add) %>)</h3> | |
<div id="reasons"> | |
<%= render :partial => 'reason', :collection => @report.reasons %> | |
</div> |
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
$(".reason_content").autocomplete("/administration/reasons.js", { | |
width: 620, | |
max: 10, | |
highlight: false, | |
scroll: true, | |
scrollHeight: 300 | |
}); |
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
<a href="#" onclick="try { | |
$("#diagnoses").append("<div class=\"diagnosis\">\n\t<dl class=\"form\">\n\t\t\n\t\t<dt class=\"optional\">Name </dt>\n\t\t<dd>\n\t\t\t<input autocomplete=\"off\" id=\"report_diagnosis_attributes__name\" name=\"report[diagnosis_attributes][][name]\" size=\"30\" type=\"text\" /> \n\t\t\t<a class=\"remove_diagnosis\" href=\"#\">remove</a>\n\t\t</dd>\n\t\t\n\t</dl>\n</div>"); | |
} catch (e) { alert('RJS error:\n\n' + e.toString()); alert('$(\"#diagnoses\").append(\"<div class=\\\"diagnosis\\\">\\n\\t<dl class=\\\"form\\\">\\n\\t\\t\\n\\t\\t<dt class=\\\"optional\\\">Name </dt>\\n\\t\\t<dd>\\n\\t\\t\\t<input autocomplete=\\\"off\\\" id=\\\"report_diagnosis_attributes__name\\\" name=\\\"report[diagnosis_a |
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
$(".reason_content").livequery( | |
function() { | |
// var url = $(this).attr('autocomplete_url'); | |
$(this).autocomplete("/administration/reasons.js"); | |
} | |
); |
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
conditions = Where.new | |
conditions.or('accounts.phone like ?', '%' + params[:search] + '%') unless params[:search].blank? | |
conditions.or('groups.name like ?', '%' + params[:search] + '%') unless params[:search].blank? | |
# new rails feature, :joins permit to have conditions based on the joined table. | |
# http://ryandaigle.com/articles/2008/7/7/what-s-new-in-edge-rails-easy-join-table-conditions | |
@accounts = Account.paginate(:page => params[:page] || 1, :joins => :group, :conditions => conditions, :include => :group) |
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
[{"value"=>"10", "parameter_id"=>"14"}, {"value"=>"2", "parameter_id"=>"14"}] |
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
irb(main):001:0> ME = 5.freeze | |
=> 5 | |
irb(main):002:0> ME.frozen? | |
=> false | |
irb(main):003:0> ME = "5".freeze | |
(irb):3: warning: already initialized constant ME | |
=> "5" | |
irb(main):004:0> ME.frozen? | |
=> true | |
irb(main):005:0> |
OlderNewer