Module: ActiveRecord::Comments
- Defined in:
- lib/active_record/comments.rb,
lib/active_record/comments/version.rb,
lib/active_record/comments/execute_with_comments.rb
Defined Under Namespace
Modules: ExecuteWithComments
Constant Summary
collapse
- VERSION =
"0.8.0"
- @@prepend =
false
Class Method Summary
collapse
Class Method Details
14
15
16
17
18
19
|
# File 'lib/active_record/comments.rb', line 14
def ()
<<
yield
ensure
.pop
end
|
35
36
37
|
# File 'lib/active_record/comments.rb', line 35
def
.join(" ") if .present?
end
|
31
32
33
|
# File 'lib/active_record/comments.rb', line 31
def
Thread.current[:ar_comments] ||= []
end
|
.prepend=(prepend) ⇒ Object
10
11
12
|
# File 'lib/active_record/comments.rb', line 10
def prepend=prepend
@@prepend = prepend
end
|
21
22
23
24
25
26
27
28
29
|
# File 'lib/active_record/comments.rb', line 21
def (sql)
return sql unless =
if @@prepend == true
"/* #{} */ #{sql}"
else
"#{sql} /* #{} */"
end
end
|