Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
annotate
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open-source
annotate
Commits
1c5deb09
Commit
1c5deb09
authored
Jan 19, 2020
by
Shu Fujita
Committed by
Andrew W. Lee
Jan 18, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor AnnotateModels::Helpers (#723)
I refactored two methods in AnnotateModels::Helpers for readability.
parent
9a8db1b7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
5 deletions
+2
-5
helpers.rb
lib/annotate/helpers.rb
+2
-5
No files found.
lib/annotate/helpers.rb
View file @
1c5deb09
...
...
@@ -15,14 +15,11 @@ module Annotate
end
def
true?
(
val
)
return
false
if
val
.
blank?
return
false
unless
val
=~
Constants
::
TRUE_RE
true
val
.
present?
&&
Constants
::
TRUE_RE
.
match?
(
val
)
end
def
fallback
(
*
args
)
args
.
detect
{
|
arg
|
!
arg
.
blank?
}
args
.
detect
(
&
:present?
)
end
def
reset_options
(
options
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment