Skip to content

Fix NoMethodError on untagged post#93

Merged
parkr merged 1 commit intojekyll:fix-drupal-importersfrom
nicuveo:fix-drupal-importers
Nov 23, 2013
Merged

Fix NoMethodError on untagged post#93
parkr merged 1 commit intojekyll:fix-drupal-importersfrom
nicuveo:fix-drupal-importers

Conversation

@nicuveo
Copy link

@nicuveo nicuveo commented Nov 21, 2013

Untagged posts have a nil tags value ({:tags => nil}), which results in a NoMethodError.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why don't we just go with post[:tags] || "" instead?

@nicuveo
Copy link
Author

nicuveo commented Nov 22, 2013

@parkr in case there's no :tags key in the post, which was the reason for fetch in the first place (or so I'd guessed). However, writing this, I realize there will always be a :tags key, because this is a db row... I'll fix that right now.
Oh, also, I only fully read the ruby guidelines after submitting, hence the misuse of or. Sorry for that.

Untagged posts have a nil tags value (`{:tags => nil}`), which results in a NoMethodError.
@parkr
Copy link
Member

parkr commented Nov 22, 2013

No problem! This LGTM.

parkr added a commit that referenced this pull request Nov 23, 2013
Drupal6: Fix NoMethodError on untagged post
@parkr parkr merged commit adc1351 into jekyll:fix-drupal-importers Nov 23, 2013
parkr added a commit that referenced this pull request Nov 23, 2013
@jekyll jekyll locked and limited conversation to collaborators Feb 27, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants