Created
December 12, 2014 14:16
-
-
Save Johnius/16c248472a62e5824cc8 to your computer and use it in GitHub Desktop.
This file contains 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
# 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