Created
November 9, 2016 02:16
-
-
Save katienreed/c8eeb451c4e4b614c3b8b9bed28bfeb8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#app/controllers/my_controller.rb | |
module UnitCheck | |
def unit_check(number, time) | |
if number = 1 | |
number + time.chop! | |
else | |
number + time | |
end | |
end | |
end | |
class MyController < ApplicationController | |
include UnitCheck | |
def concat_string | |
unit_check(number, time) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment