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
[ | |
{ | |
name: 'Hamburger', | |
price: 10 | |
}, | |
{ | |
name: 'Cheeseburger', | |
price: 11 | |
}, | |
{ |
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 'open-uri' | |
require 'pry' | |
class Document | |
DOT_PADDING = 3 | |
def initialize(text) | |
@words = text.gsub(/-/, ' ').split | |
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_group :development, :test do | |
gem 'pg' | |
gem 'pry' | |
gem 'devise' | |
gem 'rspec-rails' | |
gem 'factory_bot_rails' | |
gem 'capybara' | |
gem 'selenium-webdriver' | |
gem 'chromedriver-helper' |
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 Stylist < ActiveRecord::Base | |
include ActionView::Helpers::NumberHelper | |
scope :active, -> { where(active: true) } | |
scope :inactive, -> { where(active: false) } | |
scope :with_active_salon, -> { joins(:salon).merge(Salon.active) } | |
scope :non_receptionist, -> { | |
joins('LEFT JOIN user_role ON user_role.user_id = stylist.user_id') | |
.joins('LEFT JOIN role ON user_role.role_id = role.id') | |
.where('role.code != ? OR role.code IS NULL', 'RECEPTIONIST') |
OlderNewer