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
| module Invite | |
| module Inviter | |
| def self.included(base) | |
| base.extend(ClassMethods) | |
| end | |
| module ClassMethods | |
| attr_accessor :invite_block |
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
| def new | |
| @company = Company.find(params[:id]) | |
| @ticket = Ticket.new(:app => @ticket) | |
| respond_to do |format| | |
| format.html # new.html.erb | |
| format.xml { render :xml => @company } | |
| 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
| - form_for @referral do |f| | |
| - f.hidden_field :app_id | |
| - f.hidden_field :app_type |
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
| malformed UTF-8 character sequence at offset 0 (Johnson::Error) |
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 CanonicalRedirect | |
| def initialize(app) | |
| @app = app | |
| end | |
| def call(env) | |
| request = Rack::Request.new(env) | |
| if request.host =~ /^domain1/ | |
| [301, {"Location" => request.url.sub("//domain1", "//www.domain2")}, self] |
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
| def to_key | |
| new_record? ? nil : [ self.send(self.class.primary_key) ] | |
| end | |
| def persisted? | |
| false | |
| 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 MassEmailsController < InheritedResources::Base | |
| before_filter :prefix_template | |
| private | |
| def prefix_template | |
| def self.default_template_name(action_name = self.action_name) | |
| if action_name | |
| action_name = action_name.to_s | |
| if action_name.include?('/') && template_path_includes_controller?(action_name) |
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
| namespace :deploy do | |
| desc "Deploy!!!!!!!" | |
| task :default do | |
| update | |
| restart | |
| #cleanup -- no more releases to clean up -- perhaps replace with one that removes anything after the last x commits ? | |
| end | |
| desc "Setup a GitHub-style deployment." | |
| task :setup, :except => { :no_release => true } do |
NewerOlder