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
--- | |
pageMetadata: | |
pageTitle: | |
header: | |
breadcrumbs: | |
title: | |
slats: | |
# Rotator | |
- | |
moduleType: rotator-slat |
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 < ActionController::Base | |
protect_from_forgery | |
## filter_parameter_logging :password, :password_confirmation | |
helper_method :current_user_session, :current_user, :permitted_params | |
... | |
def permitted_params | |
@permitted_params || PermittedParams.new(params, current_user) | |
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
<table class="table table-bordered table-striped"> | |
<%= @invoice_reservations.each do |r| %> | |
<tr> | |
<td><%= r.name %></td> | |
</tr> | |
</table> |
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
app/controllers/invoices_controller.rb:3:in `[]' | |
app/controllers/invoices_controller.rb:3:in `show_client_invoices' |
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 "minitest_helper" | |
class EmployeeTest < MiniTest::Unit::TestCase | |
def setup | |
super | |
@employee = Employee.new(first_name: "Jannis", last_name: "Steele") | |
@user = User.new(login: "Geoblaster", password: "foobar", password_confirmation: "foobar", email: "[email protected]") | |
@employee.user = @user | |
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
routes.rb | |
---------- | |
Debateable::Application.routes.draw do | |
resources :users do | |
resources :posts | |
end | |
resources :topics do | |
resources :posts |
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 'spec_helper' | |
describe Debate do | |
#let(:prop_user) { FactoryGirl.create(:user) } | |
#let(:opp_user) { FactoryGirl.create(:user) } | |
before do | |
@prop_user = User.new(name: "Prop User", email: "[email protected]") | |
@opp_user = User.new(name: "Opp User", email: "[email protected]") | |
@debate = Debate.new(title: "Test Debate") |
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 User | |
has_many :propositions, :as => :debateable | |
has_many :oppositions, :as => :debateable | |
end | |
def Proposition | |
belongs_to :debateable, :polymorphic => :true | |
has_one :opposition, :as => :debateable | |
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
class PokerGame | |
include Enumerable | |
include Comparable | |
attr_reader :hand | |
def initialize(hands, cards) | |
ranks = %w{ 2 3 4 5 6 7 8 9 T J Q K A } | |
suits = %w{ S H D C } | |
card_stack = Array.new | |
num_hands = Array.new |
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 PokerGame | |
include Enumerable | |
include Comparable | |
attr_reader :hand | |
def initialize(hands, cards) | |
ranks = %w{ 2 3 4 5 6 7 8 9 T J Q K A } | |
suits = %w{ S H D C } | |
card_stack = Array.new | |
h = Array.new |