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.4.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
|
.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
"/* #{comment} */ #{sql}"
else
"#{sql} /* #{comment} */"
end
end
|