Skip to content

Commit

Permalink
Better comments for helper method
Browse files Browse the repository at this point in the history
  • Loading branch information
brianpattison committed Oct 15, 2015
1 parent 7e43067 commit e78da21
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/helpers/blocky_helper.rb
@@ -1,7 +1,8 @@
# Rails view helper for rendering Blocky content inside view templates.
module BlockyHelper
# Render a Blocky content block with the given content key.
# @param content_key [String]
# Render a Blocky content block with the given unique key. If a block is given, the
# content inside the block will be saved if it doesn't already exist for the given key.
# @param content_key [Symbol] The key should describe the content
def blocky(content_key, &block)
content_block = Blocky::ContentBlock.where(content_key: content_key).first_or_initialize

Expand Down
1 change: 1 addition & 0 deletions lib/blocky/admin/content_block.rb
@@ -1,5 +1,6 @@
if defined?(ActiveAdmin)
ActiveAdmin.register Blocky::ContentBlock, as: "ContentBlock" do
config.batch_actions = false
config.sort_order = "description_asc"

controller do
Expand Down

0 comments on commit e78da21

Please sign in to comment.