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
# At this checkout step indicator, all the checkout steps are turned into links. But how to | |
# turn *only* my completed steps into links? | |
# | |
# <jammanbo> state_machine has no memory. if you need to determine whether you have been | |
# in a state you need to design your machine so that that can be determined from the | |
# current state. | |
# | |
# ---------- | |
# | |
# Expected result: |
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
get "omnigraffle(:version)_stencils" => "home#index", as: :omni | |
= link_to "omni1", omni_path(:version => 1) | |
= link_to "omni", omni_path | |
<a href="/omnigraffle1_stencils">omni1</a> | |
<a href="/omnigraffle_stencils">omni</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
describe "GET #new" do | |
before do | |
@user = User.new | |
User.stub(:new).and_return(@user) | |
end | |
it "authorizes access" do | |
should_authorize(:new, @user) | |
get :new | |
ned |
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 Parent | |
attr_accessor :something | |
def print | |
puts self.something | |
end | |
end | |
class Child < Parent | |
def print |
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
source 'https://rubygems.org' | |
gem 'rails', '3.2.8' | |
# Bundle edge Rails instead: | |
# gem 'rails', :git => 'git://github.com/rails/rails.git' | |
gem 'sqlite3' | |
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
$('#<%= dom_id(@match) %>').fadeOut(); |
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 'spec_helper' | |
describe "customers" do | |
describe "signup" do | |
#FactoryGirl.find_definitions | |
let(:user) { FactoryGirl.create(:signup_customer)} | |
it "has right data" do | |
visit signup_path | |
fill_in :id, :with => 2110001 |
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
# app/models/namespace/questionnaire.rb | |
class Namespace::Questionnaire < ActiveRecord::Base | |
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 AttendancesController < ApplicationController | |
before_filter :authenticate_user! | |
load_and_authorize_resource | |
def show | |
end | |
def update | |
@attendance.update_attributes params[:attendance] | |
redirect_to root_path |
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
#user_totals_chart | |
:javascript | |
Chart = {} | |
Chart.series = [{ | |
data: #{User.order("created_at").group("date(created_at)").select("count(id) as total, date(created_at) as created_at").all.map {|u| [u.created_at.to_i * 1000, u.total.to_i]}}, | |
name: 'Benutzer' | |
}]; | |
:coffeescript |
OlderNewer