Skip to content

Instantly share code, notes, and snippets.

View ckk-scratch's full-sized avatar

Christopher Knight ckk-scratch

  • Scratch Music Group
  • New York City
View GitHub Profile
#event-list-index-wrapper {
margin-top: 25px;
.view-types {
font-size: 20px;
position: relative;
text-align: left;
float: left;
width: 100%;
require 'spec_helper'
describe EventsController do
let(:event) {FactoryGirl.create(:event)}
describe "show" do
describe "for non-signed-in users" do
before {get :show, id: event}
%tr
%td{:style => "padding: 25px; text-align: left; font-family: sans-serif; font-size: 15px; mso-height-rule: exactly; line-height: 20px; color: #555555;"}
%p
You have been sent event details by
%i= "#{@user.name ? @user.name : @user.email}."
%p
Please direct all event matters to your organization's responsible party, or to the Scratch Events Operations Manager.
%i
%p
="- Scratch Events "
class CampaignsController < ApplicationController
authorize_resource except: [:public, :confirm_event, :cancel_talent]
load_resource except: [:public, :index]
before_filter :prepare_events, only: [:show, :show_events]
before_filter :check_campaign_open, only: [:confirm_event, :cancel_talent, :add_talent, :remove_talent, :add_events, :remove_events]
def index
@campaigns = Campaign.order(created_at: :desc)
end
class TalentController < ApplicationController
authorize_resource
def index
@regions = Region.where(type: Region.name).order(:state,:name)
@region_id = params[:region_id]
@status = params[:status]
region = Region.find(@region_id) unless @region_id.blank?
page = params[:page].nil? ? 1 : params[:page].to_i
@ckk-scratch
ckk-scratch / project.rb
Last active December 4, 2020 05:37
Rails Admin dropzone config
class Project < ActiveRecord::Base
extend FriendlyId
friendly_id :title, use: :slugged
has_and_belongs_to_many :artists
has_many :gallery_images
belongs_to :category
has_attached_file :hero, styles: { large: "1280x1024>", medium: "650x650" }
validates_attachment_content_type :hero, content_type: /\Aimage\/.*\Z/