My thought was I see a lot of profanity stuff that could be pulled into its
own object, this would be the first one to go.

Sometimes less indirection is definitely better for talks or in general!


On Sun, Apr 20, 2014 at 11:25 AM, Justin Gordon <notifications@github.com>wrote:

> In app/models/micropost.rb:
>
> > @@ -22,4 +23,37 @@ def self.from_users_followed_by(user)
> >      where("user_id IN (#{followed_user_ids}) OR user_id = :user_id",
> >            user_id: user.id)
> >    end
> > +
> > +  # return array of profane words in content or nil if none
> > +  def profane_words_in_content
>
> I've gone back and forth on this one. So long as the implementation would
> justify it, I'd agree. However, I've chosen to keep it simpler for the
> example.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/justin808/fat-code-refactoring-techniques/pull/15/files#r11798260>
> .
>



-- 


--
James
@thatrubylove

Advanced Ruby musings @ RubyLove.io
https://www.rubylove.io

Expert mentor @ Codementor.io
https://www.codementor.io/thatrubylove