Hmm, this issue is when you make a new post, it will have a unique I'd,
which means your find_by_id will always return no match. I think you need
to check for dups using a find_by_name or something other attribute.
On Apr 18, 2014 6:57 PM, "3B7" <notifications@github.com> wrote:

> In app/models/post.rb:
>
> >      post.save
> >      end
> >    end
> > +
> > +  def self.find_by_id
> > +    if @espn_post.id.exists? == false
> > +      Post.new
> >
>
> I'm not sure if my logic above makes sense but I'll try to spell it out. I
> added an :id attr_accesible since it's unique to every story in the espn
> api.
>
> def self.find_by_id
> if current_post.id.exists is false
> PostNewStory
> end
>
> the idea is that if the current_post *does not* exist, that means it's
> not posted yet. So then it should be posted. Follow? i feel like I haven't
> had much issue wrapping my mind around what needs to be done but the
> execution, the actual code writing part mind you, is still difficult.
>
> As always thanks!
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/3B7/honeybadger/pull/16/files#r11791528>
> .
>