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
func! Fire(name) | |
let command = "curl -u 2cee4028ecfc5a0fed2325b150565714961c429e:X -H \'Content-Type: application/json\' -d \'{\"message\":{\"body\":" . a:name . "\"}}\' https://metis7.campfirenow.com/room/584821/speak.json" | |
call system(command) | |
" echom "Hello! My name is:" | |
" echom a:name | |
endfunc | |
command! Hello :call Fire("test") | |
" command! -nargs=1 Fire call s:Fire(<f-args>) |
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 DiscussionsController < ApplicationController | |
before_action :authorize, only: [:new, :create] | |
def new | |
@discussion_form = DiscussionForm.new | |
@types = ["Image", "Document", "Code", "Video", "Audio"] | |
end | |
def show | |
@discussion = Discussion.find_by(token: params[:id]) |
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 Url < ActiveRecord::Base | |
before_create :generate_unique_token, :escape_original_url | |
validates :original_url, presence: true | |
validate :check_if_url_is_valid | |
def to_param | |
token | |
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
testing |
NewerOlder