Module: ComponentParty::ActionView::Renderer
- Defined in:
- lib/component_party/action_view/renderer.rb
Instance Method Summary collapse
-
#normalize_component_path!(_context, options) ⇒ void
An example of options argumento passed by Rails are { :prefixes=>["devise/sessions", "devise", "application"], :template=>"new", :layout=> a Proc }.
- #normalize_data_for_component_rendering!(context, options) ⇒ void
Instance Method Details
#normalize_component_path!(_context, options) ⇒ void
An example of options argumento passed by Rails are { :prefixes=>["devise/sessions", "devise", "application"], :template=>"new", :layout=> a Proc }
31 32 33 34 35 36 37 38 39 |
# File 'lib/component_party/action_view/renderer.rb', line 31 def normalize_component_path!(_context, ) if [:component] == true [:component] = Pathname.new([:prefixes].first.to_s).join([:template]).to_s [:prefixes] = [ComponentParty.configuration.component_folder_for_actions] else [:component] [:prefixes] = [] end end |
#normalize_data_for_component_rendering!(context, options) ⇒ void
20 21 22 23 |
# File 'lib/component_party/action_view/renderer.rb', line 20 def normalize_data_for_component_rendering!(context, ) normalize_component_path!(context, ) context.instance_variable_set('@current_component_path', [:component]) end |