we are using
http://edgeguides.rubyonrails.org/contributing_to_ruby_on_rails.html#follow-the-coding-conventions
and
have been for a while now.


On Fri, Mar 29, 2013 at 1:01 PM, Nourhan Mohamed
<notifications@github.com>wrote:

> In arability/app/models/keyword.rb:
>
> > +  	#			returns an empty list if the search keyword had no matches or no
> > +    #     similar keywords were found
> > +    def get_similar_keywords(search_word, categories = [])
> > +    	if (search_word.blank?)
> > +    		return []
> > +    	end
> > +      search_word.downcase!
> > +    	keyword_list = self.where("name LIKE ?", "%#{search_word}%")
> > +        .where(:approved => true)
> > +      if categories != []
> > +        keyword_list =
> > +          keyword_list.joins(:categories)
> > +            .where("categories.name" => categories)
> > +      end
> > +    	relevant_first_list = keyword_list
> > +        .sort_by {|keyword| [keyword.name.downcase.index(search_word),
>
> according to http://rails.nuvvo.com/lesson/5017-ruby-coding-conventionthis is not wrong :D
> See block methods section
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/MGhanem/smartsoft-13/pull/151/files#r3584648>
> .
>