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):002:0> summary = "<p>Some summary review.</p>\n\r" | |
=> "<p>Some summary review.</p>\n\r" | |
irb(main):003:0> detail = "<p>Some detailed review</p>\n" | |
=> "<p>Some detailed review</p>\n" | |
irb(main):004:0> CrazyHarry.fragment(summary).redact!(unsafe: true, tags: 'p').to_s | |
=> "Some summary review." | |
irb(main):005:0> CrazyHarry.fragment(summary + detail).redact!(unsafe: true, tags: 'p').to_s | |
=> "Some summary review.\n\n\rSome detailed review" |
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
departures = [ | |
{ | |
availability: 12, | |
start_date: "2013-05-11", | |
pricing: [ | |
{ | |
age_group: "Child", | |
prices: [ | |
{:name=>"USD", :value=>1199.0}, | |
{:name=>"AUD", :value=>1199.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
departures = [ | |
{ | |
availability: 12, | |
start_date: "2013-05-11", | |
pricing: [ | |
{ | |
age_group: "Child", | |
prices: [ | |
{:name=>"USD", :value=>1199.0}, | |
{:name=>"AUD", :value=>1199.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
departures: [ | |
{ | |
availability: 2 | |
discounted: false | |
discount: nil | |
start_date: 06-04-2013 | |
pricing: [ | |
Some prices | |
] | |
}, |
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
departures: [ | |
{ | |
availability: 2 | |
discounted: false | |
start_date: 06-04-2013 | |
pricing: [ | |
{ | |
age_group: "Adult", | |
prices: [ | |
{name: "USD", value: 1000}, |
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
public class Koło { | |
private double promień; | |
public Koło(int a){ | |
promień = a; | |
} | |
public double obliczObwódKoła(){ | |
return 2*Math.PI*promień; | |
} |
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
public class Koło { | |
int promień; | |
public Koło(int a){ | |
promień = 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
class ProjectsController < ApplicationController | |
# student.project is the reference to associated AR Project model. | |
def users_projects | |
teams = Team.all | |
students = teams.map(&:students).flatten | |
@student_projects = students.select do |student| | |
student.project.status == "Active" | |
end | |
end |
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
<div class="row mt-3"> | |
<div class="col-10"> | |
<table class="table dashboard-daily-table"> | |
<thead class="thead-light dashboard-daily-table-header"> | |
<tr> | |
<th width="18%" scope="col"><%= Date.today.strftime("%A") %></th> | |
<th width="64%" scope="col"></th> | |
<th width="18%" scope="col"></th> | |
</tr> | |
</thead> |
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
class User | |
def admin? | |
role == 'admin' | |
end | |
def marketer? | |
role == 'marketer' | |
end | |
def sales? |