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 |
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 |
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' |
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') | |
) |
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') | |
) |
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 |
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'); | |
}); | |
}); | |
}); |
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]) |
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 %> |
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 |
OlderNewer