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
<div class="well"> | |
<h1 id="selected_winner">Spin To Select A Winner!</h1> | |
<br/> | |
<div id="planeMachine" style="overflow: hidden; height: 70px;" class="" > | |
<div class="slotMachineContainer" style="transition: 0.9s ease-out; transform: matrix(1, 0, 0, 1, 0, -240);"> | |
<% @raffle_entries.each do |re| %> | |
<div class="text-center"> | |
<h1 id="panel1"><%= "#{re[:fname]} #{re[:lname]}" %></h1> | |
</div> |
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 User < ActiveRecord::Base | |
has_many :lead_offers | |
has_many :leads, through: :lead_offers | |
end | |
class Lead < ActiveRecord::Base | |
has_many :lead_offers, dependent: :destroy | |
has_many :users, :through => :lead_offer | |
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
$ gem list | |
*** LOCAL GEMS *** | |
actionmailer (4.2.4) | |
actionpack (4.2.4) | |
actionview (4.2.4) | |
activejob (4.2.4) | |
activemodel (4.2.4) | |
activerecord (4.2.4) |
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
config.time_zone = "Pacific Time (US & Canada)" | |
config.active_record.default_timezone = "Pacific Time (US & Canada)" |
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
curl -i -H "Accept: application/json" -X POST -H "Content-Type: application/json" -H "X-API-EMAIL:[email protected]" -H "X-API-TOKEN:tokengoeshere" http://127.0.0.1:3000/api/v1/send_vendor_list | |
I've also tried changing the json to html | |
curl -i -H "Accept: application/html" -X POST -H "Content-Type: application/json" -H "X-API-EMAIL:[email protected]" -H "X-API-TOKEN:tokengoeshere" http://127.0.0.1:3000/api/v1/send_vendor_list | |
curl -i -H "Accept: application/html" -X POST -H "Content-Type: application/html" -H "X-API-EMAIL:[email protected]" -H "X-API-TOKEN:tokengoeshere" http://127.0.0.1:3000/api/v1/send_vendor_list | |
curl -i -H "Accept: application/json" -X POST -H "Content-Type: application/html" -H "X-API-EMAIL:[email protected]" -H "X-API-TOKEN:tokengoeshere" http://127.0.0.1:3000/api/v1/send_vendor_list |
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
I have a model that looks like: | |
# == Schema Information | |
# | |
# Table name: vendors | |
# | |
# id :integer not null, primary key | |
# company_name :string | |
# category :string | |
# |
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
I'm trying to test the controller - to make sure that a logged in user who is not an admin user, cannot look at another users show page, and that they can look at their own. | |
I'm beginning to suspect that this testing is really only relevant inside the policy tests and that I have to assume that the controllers are following the policies as described. | |
The system uses: | |
Rails 4.2.1 | |
Minitest | |
Devise | |
Pundit | |
Rolify |
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/spec' | |
require 'minitest/autorun' | |
describe 'Game' do | |
it 'should have 3 pegs' do | |
game = Game.new | |
game.pegs.count.must_equal 3 | |
end | |
it 'should have 3 discs by default' do |
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 code is unfinished as of yet, this is as far as we got during the meeting | |
class Parser | |
def initialize filename, delimiter="," | |
@fhandle = File.open(filename, 'r') | |
@delim = delimiter | |
@header = [] | |
@arr_val = [] | |
line_str = @fhandle.readline | |
@header = parse_row(line_str) | |
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 MyObj < ActiveRecord::Base | |
attr_accessor :i_can_select | |
end | |
# ---------------------- | |
class MyController < ApplicationController | |
def index | |
@list = MyObj.all |
NewerOlder