Class: Headmin::BlocksView

Inherits:
ViewModel show all
Defined in:
app/models/headmin/blocks_view.rb

Instance Method Summary collapse

Methods inherited from ViewModel

#attributes, #initialize, #to_hash

Constructor Details

This class inherits a constructor from ViewModel

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class ViewModel

Instance Method Details

#pathsObject



7
8
9
# File 'app/models/headmin/blocks_view.rb', line 7

def paths
  @paths || []
end

#prefixesObject



11
12
13
# File 'app/models/headmin/blocks_view.rb', line 11

def prefixes
  paths + ["website/blocks", "blocks"]
end

#show_blocks?Boolean

Returns:

  • (Boolean)


3
4
5
# File 'app/models/headmin/blocks_view.rb', line 3

def show_blocks?
  blockable&.respond_to?(:blocks)
end