noosfero | Applying SOLID techniques (!1273)

Leandro Nunes gitlab at mg.gitlab.com
Tue Jul 4 14:19:36 BRT 2017


Leandro Nunes started a new discussion on app/models/concerns/code_numbering.rb:

>        self.code_scope.maximum(self.code_numbering_field) || 0
>      end
>  
> +    def code_max
> +      max = nil
> +           
> +      if self.code_numbering_options[:start]
> +        max = self.code_numbering_options[:start].to_i - 1
> +      end
> +
> +      return max

It's not the ruby way, just put the variable at the end of the method

---
Reply to this email directly or view it on GitLab: https://gitlab.com/noosfero/noosfero/merge_requests/1273#note_34167238
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20170704/afb2ac3a/attachment-0001.html>


More information about the Noosfero-dev mailing list