Module: ActiveMetadata::StreamHelper

Defined in:
app/helpers/active_metadata/stream_helper.rb

Instance Method Summary collapse

Instance Method Details

#clean_class_name(name) ⇒ Object



9
10
11
# File 'app/helpers/active_metadata/stream_helper.rb', line 9

def clean_class_name name
  name.split('::').last || nil
end

#stream_partial_path(element) ⇒ Object



4
5
6
7
# File 'app/helpers/active_metadata/stream_helper.rb', line 4

def stream_partial_path element
  class_name_downcase = clean_class_name element.class.to_s.downcase
  "active_metadata/#{class_name_downcase.pluralize}/#{class_name_downcase}"
end