This file contains hidden or 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
class Days | |
attr_reader :day, :fck_tests | |
def initialize(day, fck_tests = []) | |
@day = day | |
@fck_tests = fck_tests | |
end | |
end | |
class DaysBuilder |
This file contains hidden or 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
def calculate_scheduled_for_the_month | |
sum = 0.0 | |
return sum if @planning.empty? | |
where_for_planning = clause_where_for_planning | |
i = 0 | |
@planning.where(where_for_planning).each do |p| | |
p.preenchimentos.each_with_index do |obj, index| | |
obj.dth_inicio = Time.now - index.days | |
obj.dth_fim = Time.now + index.days |
This file contains hidden or 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
class ApplicationController; end | |
module Planning; end | |
class PlanningContoller < ApplicationController | |
def index | |
Planning::Index.new(planning_params).run do |parameters| | |
create_planning(parameters) | |
render :index, status: 200 | |
end | |
end |
This file contains hidden or 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
// The Vue build version to load with the `import` command | |
// (runtime-only or standalone) has been set in webpack.base.conf with an alias. | |
import 'normalize.css/normalize.css' | |
import Vue from 'vue' | |
import App from './App' | |
import './assets/basic_styles.css' | |
import lang from 'element-ui/lib/locale/lang/en' | |
import locale from 'element-ui/lib/locale' | |
import { Checkbox, Collapse, CollapseItem, Button, Input, Form, FormItem, Slider, Select, Option } from 'element-ui' | |
import router from './router' |
This file contains hidden or 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 update_total(data) { | |
data.total = data.value * data.quantity | |
} | |
var registryProxy | |
// Go through each of our data properties | |
registry_observer = function(data) { | |
track_keys = ['value', 'quantity'] | |
track_keys.forEach(function(key) { |
This file contains hidden or 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 'pp' | |
$group_management = [] | |
class CalculateValue | |
attr_reader :totalValueOfFriendship | |
def initialize(friendshipsLookupTable) | |
@friendshipsLookupTable = friendshipsLookupTable | |
@additionalLinks = 0 |
This file contains hidden or 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
window.onscroll = function(ev) { | |
if ((document.defaultView.innerHeight + document.defaultView.scrollY) == document.body.scrollHeight) { | |
$('.item.number.active').next('.item').find('a').get(0).click() | |
} | |
}; |
This file contains hidden or 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
// HTML | |
<div class="inspection-imagecontainer"> | |
<img src="http://oneimage.com"/> | |
</div> | |
// CSS | |
.inspection-imagecontainer{ | |
display: inline-block; | |
width: 33%; |
This file contains hidden or 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
validateRules: { | |
number: { | |
presence: true, | |
message: 'O n煤mero do processo 茅 obrigat贸rio' | |
}, | |
processTypeId: { | |
presence: true, | |
message: '脡 obrigat贸rio preencher uma das op莽玫es' | |
}, | |
debt: { |
This file contains hidden or 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
# https://stackoverflow.com/questions/28670159/rspec-factory-girl-without-rails | |
# https://stackoverflow.com/questions/3661546/how-to-require-active-record-working-outside-of-rails | |
# https://stackoverflow.com/questions/1755665/get-names-of-all-files-from-a-folder-with-ruby | |
require 'active_record' | |
require 'pg' | |
ActiveRecord::Base.establish_connection( | |
adapter: 'postgresql', | |
database: 'stant_test', | |
username: 'stant', |