This repository has been archived on 2020-10-16. You can view files and clone it, but cannot push or open issues or pull requests.
counter/app/helpers/application_helper.rb

11 lines
250 B
Ruby
Raw Normal View History

2020-05-15 01:02:59 +00:00
# frozen_string_literal: true
module ApplicationHelper
def component(component_name, locals = {}, &block)
2020-05-23 03:54:14 +00:00
name = component_name.split('_').first
render("components/#{name}/#{component_name}", locals, &block)
end
alias c component
2020-05-15 01:02:59 +00:00
end