Class: IronAdmin::Dashboards::ActivityFeedComponent

Inherits:
ViewComponent::Base
  • Object
show all
Defined in:
app/components/iron_admin/dashboards/activity_feed_component.rb

Overview

Renders an activity feed on the dashboard.

Defined Under Namespace

Classes: ItemComponent

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(title: "Recent Activity") ⇒ ActivityFeedComponent

Returns a new instance of ActivityFeedComponent.

Parameters:

  • title (String) (defaults to: "Recent Activity")

    Feed title (default: "Recent Activity")



13
14
15
# File 'app/components/iron_admin/dashboards/activity_feed_component.rb', line 13

def initialize(title: "Recent Activity")
  @title = title
end

Instance Attribute Details

#titleString (readonly)

Returns Feed title.

Returns:

  • (String)

    Feed title



10
11
12
# File 'app/components/iron_admin/dashboards/activity_feed_component.rb', line 10

def title
  @title
end

Instance Method Details

#render?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns Whether to render the component.

Returns:

  • (Boolean)

    Whether to render the component



25
26
27
# File 'app/components/iron_admin/dashboards/activity_feed_component.rb', line 25

def render?
  items.any?
end

#themeIronAdmin::Configuration::Theme

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns Theme configuration.

Returns:



19
20
21
# File 'app/components/iron_admin/dashboards/activity_feed_component.rb', line 19

def theme
  IronAdmin.configuration.theme
end