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
    
  
  
    
  | .lead { | |
| font-size: 1.3em; | |
| font-weight: 200; | |
| line-height: 1.6; | |
| &.dropcap:first-letter { | |
| float: left; | |
| font-size: 3.4rem; | |
| line-height: 2rem; | |
| padding-top: 1.2rem; | 
  
    
      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
    
  
  
    
  | <?php | |
| /** | |
| * Plugin Name: Lasso Sample Settings Addon | |
| * | |
| */ | |
| add_filter('lasso_modal_tabs','try_tabs'); | |
| function try_tabs( $tabs ){ | |
| $tabs[] = array( | 
  
    
      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.omniauth :wordpress_hosted, ENV['SSO_KEY'], ENV['SSO_SECRET'], | |
| strategy_class: OmniAuth::Strategies::WordpressHosted, | |
| client_options: { site: ENV['SSO_URL'] } | 
  
    
      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
    
  
  
    
  | module Checkups::Notify | |
| require 'slack-notify' | |
| class Dispatch | |
| def initialize(params) | |
| @message = params[:message] | |
| @room = params[:room] || '#web-dev_events' | |
| @botname = params[:botname] || 'EDU Bot' | 
  
    
      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
    
  
  
    
  | # In a View | |
| <%= render 'bookmarks/add_remove', record: @lesson %> | |
| # The Partial | |
| <% if current_customer && current_customer.bookmarked_content?(record) %> | |
| <%= button_to bookmark_path(current_customer.bookmark_for_content(record), bookmarkable_type:record.class.name, bookmarkable_id:record.id), method: :delete, class:'btn btn-sm btn-light box-shadow', form_class:'add-remove-bookmark', data:{disable_with:'Removing...'}, remote: true do %> | |
| <%= ms_icon('minus-circle', title:'Unsave This') %> | |
| <% end %> | |
| <% else %> | |
| <%= button_to bookmarks_path(bookmarkable_type:record.class.name, bookmarkable_id:record.id), method: :post, class:'btn btn-sm btn-light box-shadow', form_class:'add-remove-bookmark', data:{disable_with:'Adding...'}, remote: true 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
    
  
  
    
  | # Roles Table | |
| Role.create([{name:'admin'},{name:'staff'}]) | |
| # Users Roles Table | |
| UserRole.create(user: User.find_by_username('corndog'), role: Role.find_by_name('admin')) | |
| # User Model | |
| class User < ApplicationRecord | |
| def role?(role) | |
| role.kind_of?(Array) ? role.map { |role| has_role?(role) }.any? : has_role?(role) | 
  
    
      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 GiftCard < ApplicationRecord | |
| belongs_to :site | |
| belongs_to :subscription_plan, optional: true | |
| acts_as_tenant :site | |
| include ProductConcern | |
| include ImageUploader[:image] | |
| enum status: { draft:0, published:1} | 
  
    
      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
    
  
  
    
  | module TenantServices | |
| class AccessService | |
| def initialize(params) | |
| @site = params[:site] | |
| @customer = params[:customer] | |
| @user = params[:user] | |
| @record = params[:record] | |
| @feature = params[:feature] | 
  
    
      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 BookmarksController < ApplicationController | |
| BOOKMARKABLES = { | |
| 'Course' => Course, | |
| 'Lesson' => Lesson, | |
| 'Post' => Post, | |
| 'LiveStream' => LiveStream, | |
| 'Download' => Download, | |
| 'Project' => Project, | |
| 'Exercise' => Exercise, |