Sha256: 931353dfab17675335fda795fc6f762e51151e7747ce28b4c1100bb3e86698d8
Contents?: true
Size: 378 Bytes
Versions: 4
Compression:
Stored size: 378 Bytes
Contents
class <%= controller_class_name %>Controller < InheritedResources::Base <% if options[:singleton] -%> defaults :singleton => true <% end -%> <% if belongs_to -%> belongs_to :<%= parent_name %> <% end -%> <% if child_model? && !belongs_to -%> def begin_of_association_chain @<%= parent_name %> ||= <%= parent_class %>.find(params[:<%=parent_id%>]) end <% end -%> end
Version data entries
4 entries across 4 versions & 1 rubygems