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
.row | |
- @pets.each_with_index do |pet, index| | |
- index = index += 1 | |
- if index % 7 == 0 | |
.small-12.medium-4.large-3.columns | |
.panel.card-style.centered | |
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> | |
<!-- Pet Page --> | |
<ins class="adsbygoogle" | |
style="display:inline-block;width:250px;height:250px" |
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
<a href='http://boostfitnessmarketing.com/fitnesstexter'> | |
<img src='http://boostfitnessmarketing.com/wp-content/uploads/FitnessTexter-Website-Icon.png'> | |
</a> |
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 CrossfitNameGeneratorController < ApplicationController | |
def new | |
@counter = Counter.where(name:"CrossFit").first | |
end | |
def create | |
@counter = Counter.where(name:"CrossFit").first | |
respond_to do |format| |
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 Video < ActiveRecord::Base | |
belongs_to :category , foreign_key: 'category_id' | |
validates :title, presence: true | |
validates :description, presence: true | |
end | |
--------- Different Code Below. Same Gist Though ---------- |
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 ContactMailer < ActionMailer::Base | |
def contact_form_email(obj) | |
mail :subject => "Contact Form Submission", | |
:to => "pmichaeljones@gmail.com", | |
:from => "#{obj[:user][:address]}" | |
#THIS IS THE IMPORTANT CHANGE | |
merge_vars = |
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
<div class="col-md-2"> | |
<div class="panel panel-primary"> | |
<div class="panel panel-heading"> | |
<h3 class="panel-title">CrossFit Name Generator!</h3> | |
</div> | |
<div class="panel-body"> | |
<%= form_tag(crossfit_name_generator_index_path, remote: true) do %> | |
<div class='form-group'> | |
<div class='input-group'> | |
<div class='input-group-addon'><span class='glyphicon glyphicon-arrow-right'></span></div> |
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
.col-md-4 | |
.panel.panel-primary | |
.panel.panel-heading | |
%h3.panel-title CrossFit Name Generator | |
.panel-body | |
%p Please use singular adjectives such as: funny, crazy, powerful, etc. | |
= form_tag crossfit_name_generator_index_path, action: "create", remote: "true" do | |
.form-group | |
.input-group | |
.input-group-addon |
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
<form id="cf-form" /> | |
<input type="text" id="cf-name" name="cf-name"/> | |
<input type="submit" id="cf-button" value="Submit!" /> | |
</form> | |
<p id="result"></p> | |
<script> | |
$(document).ready(function(){ | |
submit_form(); |
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
module Hand | |
attr_accessor :score, :hand | |
@hand = [] | |
@score = 0 | |
def add_card(card) | |
@hand << card | |
end |