Sha256: 0a8771e6259856da96291fb01101963e82e9d55adff6ddb810bcc2b0c2199ef5
Contents?: true
Size: 548 Bytes
Versions: 1
Compression:
Stored size: 548 Bytes
Contents
module PushType module NodesHelper def nodes_array(nodes) nodes.map { |n| node_hash(n) } end def node_hash(asset) hash = [ :type, :title, :slug, :status, :published_at, :published_to, :new_record?, :published? ].inject({}) do |h, att| h.update att => asset.send(att) end end def node_back_link(node) if node.trashed? push_type.trash_nodes_path elsif node.root? push_type.nodes_path else push_type.node_nodes_path(node.parent) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
push_type_admin-0.3.1 | app/helpers/push_type/nodes_helper.rb |