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
module CalculatorPortal | |
module Products | |
module DefaultProductActions | |
# ACTION | |
def environment | |
init_environment_step | |
raise NotFound, 'variables values not setted' unless @active_simulator_step || | |
!@actual_calculator_step || |
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
module CalculatorPortal::Products::Protheus | |
class NewController < CalculatorPortal::Products::ApplicationController | |
before_filter :is_a_customer_logged? | |
before_action :load_simulator_calculator, :check_calculator, :check_step | |
before_action :allow_breadcrumb, only_for: [ :environment, :environment_additional, :service, :support, :platform, :predictability,:summary ] | |
include ApplicationHelper | |
include CalculatorPortal::Products::DefaultProductActions | |
def service |
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
On Demand | |
Linux: http://a0.awsstatic.com/pricing/1/ec2/linux-od.min.js | |
Windows: http://a0.awsstatic.com/pricing/1/ec2/mswin-od.min.js | |
RHEL: http://a0.awsstatic.com/pricing/1/ec2/rhel-od.min.js | |
SLES: http://a0.awsstatic.com/pricing/1/ec2/sles-od.min.js | |
Windows w/ SQL Std: http://a0.awsstatic.com/pricing/1/ec2/mswinSQL-od.min.js | |
Windows w/ SQL Web: http://a0.awsstatic.com/pricing/1/ec2/mswinSQLWeb-od.min.js | |
Reserved Light |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<!--<meta http-equiv="X-UA-Compatible" content="IE=edge">--> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<meta name="description" content="Virtue is Charity Fundraising HTML5 Template. Welcome to Child Charity Fundraising HTML5 Template for Charity organization and NGO companies."> | |
<title>Virtue | Charity Fundraising HTML5 Template</title> | |
<!-- Bootstrap --> | |
<link href="css/bootstrap.css" rel="stylesheet"> |
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
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
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 build_exam_students | |
return unless academic_classroom | |
PilotListEnrollmentAcademicYear.students_for_portal(academic_classroom.id).each do |student| | |
exam_students.build :pilot_list_enrollment_academic_year_id => student.id | |
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
INSERT INTO pessoas(id, nome, idade) SELECT id, nome, idade FROM pessoas WHERE idade > 10; | |
INSERT INTO pessoas(id, nome, idade) SELECT id, nome, idade FROM pessoas WHERE idade < 10; |
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 CreateAcademicClassroomFinalGradeStudents < ActiveRecord::Migration | |
def change | |
create_table :educacao_academic_classroom_final_grade_students do |t| | |
t.belongs_to :academic_classroom_final_grade | |
t.belongs_to :student | |
t.timestamps | |
end | |
add_index :educacao_academic_classroom_final_grade_students, :academic_classroom_final_grade_id, | |
:name => 'index_eacfgs_final_grade_id' |
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 create_resource(object) | |
object.academic_year = current_academic_year | |
object.school = current_school | |
object.transaction do | |
if super | |
EnrollmentRenewalManager.renew_enrollments(object) | |
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
require 'erb' | |
require 'ostruct' | |
namespace = OpenStruct.new(name: 'Teste', last: 'Testador') | |
template = 'Name: <%= name %> <%= last %>' | |
puts ERB.new(template).result(namespace.instance_eval { binding }) | |
#=> Name: Teste Testador |