aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides/code/getting_started/app/helpers/posts_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/guides/code/getting_started/app/helpers/posts_helper.rb')
-rw-r--r--railties/guides/code/getting_started/app/helpers/posts_helper.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/railties/guides/code/getting_started/app/helpers/posts_helper.rb b/railties/guides/code/getting_started/app/helpers/posts_helper.rb
new file mode 100644
index 0000000000..b6e8e67894
--- /dev/null
+++ b/railties/guides/code/getting_started/app/helpers/posts_helper.rb
@@ -0,0 +1,5 @@
+module PostsHelper
+ def join_tags(post)
+ post.tags.map { |t| t.name }.join(", ")
+ end
+end