-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrailsrc
36 lines (30 loc) · 1012 Bytes
/
railsrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Add Rails helpers
# if ENV['RAILS_ENV'] || (defined?(Rails) && Rails.env)
# extend Rails::ConsoleMethods if defined?(Pry)
# class Object
# def change_log(stream)
# ActiveRecord::Base.logger = Logger.new(stream)
# end
# def show_log
# change_log(STDOUT)
# end
# def hide_log
# change_log(nil)
# end
# def show_session(session)
# Marshal.load(Base64.decode64(session))
# end
# def find_me
# @dat_me ||= User.find_by_username('stephenmckinney')
# end
# end
# end
# Add Chorus-specific Rails helpers
# if (ENV['RAILS_ENV'] || (defined?(Rails) && Rails.env)) && ENV['PWD'].split('/').last == 'sbn'
# class Object
# def find_sbn() @dat_sbn ||= Community.find_by_domain('sbnation.com') end
# def find_polygon() @dat_poly ||= Community.find_by_domain('polygon.com') end
# def find_verge() @dat_verge ||= Community.find_by_domain('theverge.com') end
# def current_community() @dat_curr ||= find_verge end
# end
# end