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 ReviewsController < ApplicationController | |
def edit | |
@review = Reviews::Submitter.new(params).model | |
end | |
def update | |
submitter = Reviews::Submitter.new(params) | |
@review = submitter.model | |
submitter.on(:success) { |review| redirect_to success_reviews_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
class EventCanvas::Base | |
class << self | |
attr_reader :matrix | |
def context *context_classes | |
@context_classes = context_classes | |
end | |
def subscribers *subscribers_classes | |
@context_classes.each do |kls| |
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
<?php | |
/** | |
* Table Definition for admintype | |
*/ | |
class InvalidMatrixException extends Exception | |
{ | |
} |
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
= t('people.list.on_twitter', :link => link_to("@#{list_item.twitter}", "https://twitter.com/#{list_item.twitter}")).html_safe |
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
ruby -ryaml -e 'begin | |
YAML.load(STDIN.read) | |
p "Syntax OK" | |
rescue | |
print "ERROR: ",$!, "\n" | |
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
<?php | |
// office/lib/hooks/Client.php | |
class Client_hook | |
{ | |
public static function alterLinkFromTables($links,$do) | |
{ | |
require_once 'lib/CustomUtils.php'; |
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 Wmit::Event < 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
def with_respond(object) | |
object.respond_to?(:first) | |
end | |
def with_array(object) | |
object.kind_of? Array | |
end | |
class Aclass |
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
// | |
using('#searchMessage').expect(binding('query')).toBe('nexus'); | |
// VS | |
using('#searchMessage').expect(binding('query').toBe('nexus')); // => WRONG, but test skipped |
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 Foo | |
METHODE_NAMES = ['problems', 'maintenances', 'journeys'] | |
class << self | |
def get_var(name, hsh) | |
ApiRequest.new(params: {account_id: hsh[:email], vin: hsh[:vin]}, | |
url: "vehicles/#{hsh[:vin]}/#{name}", verb: "get").get | |
end | |
METHODE_NAMES.each do name |
OlderNewer