This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Element HasOneToMany Blocks | |
| Block HasOne Element OR HasOne Data | |
| Element AlwaysBelongsTo Definition | |
| Definition HasZeroToMany Elements | |
| Element AlwaysBelongsTo Transformation | |
| Transformation HasZeroToMany Elements | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # have this | |
| attribs = ['src', 'alt', 'title', 'longdesc'] | |
| # call this | |
| raw Liquid::Template.parse(@element.template.data).render( | |
| 'src' => data['src'], | |
| 'alt' => data['alt'], | |
| 'title' => data['title'], | |
| 'longdesc' => data['longdesc'], | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <%= | |
| raw Liquid::Template.parse( | |
| '<table>{% tablerow item in items cols: 2 %} | |
| <td>{{ item.id }}</td> | |
| <td>{{ item.created_at }}</td> | |
| {% endtablerow %} | |
| </table> | |
| ' | |
| ).render('items' => Element.find(:all).collect{|item| item.attributes}) | |
| %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class CreateContentelements < ActiveRecord::Migration | |
| def self.up | |
| create_table :contentelements do |t| | |
| t.string :name | |
| t.text :data | |
| t.references :elementdefinition | |
| t.timestamps | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class AccessComponent extends Object { | |
| public $settings = array(); | |
| public $defaults = array( | |
| 'admin_required' => array(), | |
| 'auth_denied' => array(), | |
| 'auth_required' => array(), | |
| 'denied' => array(), | |
| 'callback' => 'initialize'); |
NewerOlder