Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
class PlacardPanelWidget < Apotomo::Widget
has_widgets do
self << widget(:project_placard, 'project_1')
self << widget(:project_placard, 'project_2')
self << widget(:project_placard, 'project_3')
self << widget(:project_placard, 'project_4')
end
def display
@title = options[:title]
@locale = options[:locale]
@projects = options[:projects]
render
end
end
# in the template...
<%= render_widget :project_1, :display, :project => @projects[0] %>
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.