Skip to content

Commit

Permalink
Review response: Used ternary operator
Browse files Browse the repository at this point in the history
  • Loading branch information
romanblanco committed Nov 1, 2016
1 parent 2812be3 commit 410399c
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions app/helpers/application_helper/toolbar_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,7 @@ def toolbar_button(inputs, props)
button_class = inputs[:klass] || ApplicationHelper::Button::Basic
props[:options] = inputs[:options] if inputs[:options]
button = button_class.new(@view_context, @view_binding, @instance_data, props)
if button.skipped?
nil
else
apply_common_props(button, inputs)
end
button.skipped? ? nil : apply_common_props(button, inputs)
end

# Build select button and its child buttons
Expand Down

0 comments on commit 410399c

Please sign in to comment.