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 UsersController < ApplicationController | |
| def edit | |
| @user = User.find params[:id] | |
| what = params[:what] | |
| if ["birth_day", "location"].member?(what) | |
| render :action => "edit_#{what}" | |
| else | |
| redirect_to :action => :show | |
| end | |
| 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
| $ cap production deploy | |
| * executing `production' | |
| triggering start callbacks for `deploy' | |
| * executing `multistage:ensure' | |
| * executing `deploy' | |
| * executing `deploy:update' | |
| ** transaction: start | |
| * executing `deploy:update_code' | |
| executing locally: "git ls-remote git@git.nationalebeeldbank.nl:nationalebeeldbank.git production" | |
| * executing "git clone -q git@git.nationalebeeldbank.nl:nationalebeeldbank.git /srv/rails/nbb_production/app/releases/20110128102043 && cd /srv/rails/nbb_production/app/releases/20110128102043 && git checkout -q -b deploy 347d5ae628ff3898f42156e29f3d610e11a13db4 && (echo 347d5ae628ff3898f42156e29f3d610e11a13db4 > /srv/rails/nbb_production/app/releases/20110128102043/REVISION)" |
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 File.expand_path(File.dirname(__FILE__) + '/../acceptance_helper') | |
| feature "Allow members to log in one week after they are disapproved", %q{ | |
| In order to reduce the number of questions I ask | |
| As a member | |
| I want to see a message that my account is going to be blocked in a week from now. | |
| } do | |
| scenario "show the number of days left to login" do | |
| member = Member.make(:status => 0, :grace_period_until => 1.week.from_now) |
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
| Started by an SCM change | |
| Checkout:workspace / /var/lib/jenkins/jobs/NationaleBeeldbank_Rails2/workspace - hudson.remoting.LocalChannel@1f67e563 | |
| Using strategy: Default | |
| Last Built Revision: Revision 6f84401ec9d2267b6a803f3da650d1b55ef37462 (origin/develop) | |
| Checkout:workspace / /var/lib/jenkins/jobs/NationaleBeeldbank_Rails2/workspace - hudson.remoting.LocalChannel@1f67e563 | |
| Fetching changes from the remote Git repository | |
| Fetching upstream changes from git@git.nationalebeeldbank.nl:nationalebeeldbank.git | |
| ERROR: Problem fetching from origin / origin - could be unavailable. Continuing anyway | |
| ERROR: Could not fetch from any repository | |
| FATAL: Could not fetch from any repository |
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
| Started by user anonymous | |
| Checkout:workspace / /var/lib/jenkins/jobs/NationaleBeeldbank_Rails2/workspace - hudson.remoting.LocalChannel@1f67e563 | |
| Using strategy: Default | |
| Last Built Revision: Revision 6f84401ec9d2267b6a803f3da650d1b55ef37462 (origin/develop) | |
| Checkout:workspace / /var/lib/jenkins/jobs/NationaleBeeldbank_Rails2/workspace - hudson.remoting.LocalChannel@1f67e563 | |
| Fetching changes from the remote Git repository | |
| Fetching upstream changes from git@git.nationalebeeldbank.nl:nationalebeeldbank.git | |
| Commencing build of Revision 37c4659bf3daf57064d5def306fa3ad139b8ee06 (origin/develop) | |
| Checking out Revision 37c4659bf3daf57064d5def306fa3ad139b8ee06 (origin/develop) | |
| [workspace] $ /bin/sh -xe /tmp/hudson275583439329321041.sh |
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
| # See http://edgeguides.rubyonrails.org/action_mailer_basics.html for action mailer usage | |
| class NotificationMailer < ActionMailer::Base | |
| default :from => "notifications@example.com" | |
| def product_change(product, user) | |
| @product = product | |
| mail(:to => user.email, :subject => "Welcome to My Awesome Site") | |
| end | |
| 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
| class Product < ActiveRecord::Base | |
| def next | |
| where("id > ?", self.id).first | |
| end | |
| 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
| class Invoice < ActiveRecord::Base | |
| def self.sequence | |
| AccountingSequence.where(:country => Settings[:country], "Invoice", Date.today.year).first | |
| end | |
| def set_invoice_number | |
| self.invoice_number = self.class.sequence.next! | |
| end | |
| 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
| class Regatta.AppController extends Backbone.Controller | |
| routes: | |
| ":controller/:action": "defaultRoute" | |
| defaultRoute: (controller, action) -> | |
| Regatta.current.controller = controller | |
| Regatta.current.action = action | |
| viewName = controller + "#" + action | |
| view = Regatta.view_instances[viewName] | |
| view.trigger('activated') |
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 ApplicationController | |
| include Refinery::CMS::MumboJumbo::Etc | |
| def my_helper | |
| end | |
| helper_method :my_helper | |
| end |