Skip to content

Instantly share code, notes, and snippets.

@Johnius
Created December 12, 2014 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Johnius/16c248472a62e5824cc8 to your computer and use it in GitHub Desktop.
Save Johnius/16c248472a62e5824cc8 to your computer and use it in GitHub Desktop.
# app/views/modules/shared/feedback.rb:
b :layout
e :feedback do
b :feedback, :form, action: action, method: 'POST', accept-charset: 'UTF-8', novalidate: 'novalidate', id: id do
e :input do |input|
m input.type
e :input, type: input.type, placeholder: input.placeholder
e [:submit, :input], :button, type: :submit, t '.submit'
# app/views/index.rb:
id = 1
inputs = get_inputs_collection()
# Render module
render module: 'shared/feedback' do
b :feedback, id: id
e :input, collection: inputs
m false
e :submit, t '.submit_second'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment