View gist:e50bf9a4428010dd54f2
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
FactoryGirl.define do | |
factory :user do | |
name { FFaker::Name.name } | |
password { FFaker::Internet.password(8) } | |
email { FFaker::Internet.email } | |
confirmed_at Date.today | |
end | |
end | |
FactoryGirl.define do |
View gist:d2bd83900e23d3ca929e
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
require 'acceptance_helper' | |
feature 'Survey', js: true do | |
given!(:user) { create(:user) } | |
given!(:organization) { create(:organization, owner: user) } | |
background do | |
login_as_user(user) | |
end |
View rails_helper.rb
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
# This file is copied to spec/ when you run 'rails generate rspec:install' | |
ENV['RAILS_ENV'] ||= 'test' | |
require 'spec_helper' | |
require File.expand_path('../../config/environment', __FILE__) | |
require 'rspec/rails' | |
require 'shoulda/matchers' | |
require 'capybara/rspec' | |
require 'capybara/poltergeist' | |
require "rack_session_access/capybara" | |
require 'sidekiq/testing' |
View content_hider.directive.js.coffee
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
directive = -> | |
restrict: 'A' | |
link: ($scope, $elem, $attrs) -> | |
$elem.mouseover( -> | |
console.log('test') | |
).mouseout( -> | |
console.log('test') | |
) |
View content_hider.directive.js.coffee
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
directive = -> | |
restrict: 'A' | |
link: ($scope, $elem, $attrs) -> | |
$elem.mouseover( -> | |
console.log('test') | |
).mouseout( -> | |
console.log('test') | |
) |
View gist:a7879943cb719c7a0ca1fc960dabb9fd
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
.rewards__header-mobile | |
.rewards__header-mobile--rewards-block.rewards__mobile-code-block | |
.container | |
%p.rewards__header-mobile--article-code | |
Rewards Code: | |
%span.rewards__header-mobile--code | |
Med123 | |
.rewards__header-mobile--rewards-info-block.rewards__mobile-rewards-block | |
.container | |
.row |
View tab.js
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
var App = { | |
init: function() { | |
area = document.getElementById('actionBoard'); | |
chrome.tabs.onActivated.addListener(function(e) { | |
chrome.tabs.query({active: true}, function(active) { | |
chrome.tabs.getCurrent(function(current) { | |
area.innerHTML = window.localStorage.getItem('content'); | |
}); | |
}); | |
}); |
View available_products.html.erb
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
<% Order.all.each do |o| %> | |
<%= o.buyer.name %> bought <%= o.product.name %> | |
<% end %> | |
<% cache do %> | |
All available products: | |
<% Product.all.each do |p| %> | |
<%= link_to p.name, product_url(p) %> | |
<% end %> | |
<% end %> |
View about_controller.rb
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 AboutController < ApplicationController | |
caches_page :index | |
def index | |
end | |
end |
View posts_controller.rb
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 PostsController < ApplicationController | |
before_action :authenticate | |
caches_action :index, :show | |
def index | |
@posts = Post.all | |
end | |
def show | |
@post = Post.find_by(id: params[:id]) |
OlderNewer