Class: GraphStarter::AssetPresenter
Instance Method Summary
collapse
#h, #initialize
Instance Method Details
#asset ⇒ Object
3
4
5
|
# File 'app/presenters/graph_starter/asset_presenter.rb', line 3
def asset
@object
end
|
#display_column_widths ⇒ Object
7
8
9
10
11
12
13
|
# File 'app/presenters/graph_starter/asset_presenter.rb', line 7
def display_column_widths
if main_column_exists?
? %w(three ten three) : [nil, 'thirteen', 'three']
else
['eight', nil, 'eight']
end
end
|
15
16
17
|
# File 'app/presenters/graph_starter/asset_presenter.rb', line 15
def
@left_sidebar_exists ||= asset.class.authorized_associations.size > 2
end
|
#main_column_exists? ⇒ Boolean
19
20
21
|
# File 'app/presenters/graph_starter/asset_presenter.rb', line 19
def main_column_exists?
@main_column_exists ||= asset.class.has_images? && asset.images.present? || asset.body.present?
end
|