diff --git a/app/helpers/boxes_helper.rb b/app/helpers/boxes_helper.rb index 67eb70f..eebda45 100644 --- a/app/helpers/boxes_helper.rb +++ b/app/helpers/boxes_helper.rb @@ -99,15 +99,10 @@ module BoxesHelper end def render_block_content block - # FIXME: this conditional should be removed after all - # block footer from plugins methods get refactored into helpers and views. - # They are a failsafe until all of them are done. - return block.content if block.method(:content).owner != Block render_block block end def render_block_footer block - return block.footer if block.method(:footer).owner != Block render_block block, 'footers/' end diff --git a/app/models/block.rb b/app/models/block.rb index 8538743..a05d09e 100644 --- a/app/models/block.rb +++ b/app/models/block.rb @@ -181,30 +181,6 @@ class Block < ApplicationRecord "/images/block_preview.png" end - # Returns the content to be used for this block. - # - # This method can return several types of objects: - # - # * String: if the string starts with http:// or https://, then it is assumed to be address of an IFRAME. Otherwise it's is used as regular HTML. - # * Hash: the hash is used to build an URL that is used as the address for a IFRAME. - # * Proc: the Proc is evaluated in the scope of BoxesHelper. The - # block can then use render, link_to, etc. - # - # The method can also return nil, which means "no content". - # - # See BoxesHelper#extract_block_content for implementation details. - def content(args={}) - "This is block number %d" % self.id - end - - # A footer to be appended to the end of the block. Returns nil. - # - # Override in your subclasses. You can return the same types supported by - # #content. - def footer - nil - end - # Is this block editable? (Default to true) def editable?(user=nil) self.edit_modes == "all" diff --git a/test/unit/block_test.rb b/test/unit/block_test.rb index 8fc5b8d..41f2252 100644 --- a/test/unit/block_test.rb +++ b/test/unit/block_test.rb @@ -23,10 +23,6 @@ class BlockTest < ActiveSupport::TestCase assert_nil Block.new.owner end - should 'provide no footer by default' do - assert_nil Block.new.footer - end - should 'provide an empty default title' do assert_equal '', Block.new.default_title end -- libgit2 0.21.2