Created
October 17, 2017 20:55
-
-
Save negabaro/2338b829d8ea95e6e5460109485a792b to your computer and use it in GitHub Desktop.
Rails AASM view example
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
= bootstrap_form_for(@article, layout: :horizontal) do |f| | |
= f.text_field :title, autofocus: true | |
= f.text_area :body_source, rows: 20 | |
.form-group | |
.col-sm-offset-2.col-sm-10 | |
= f.button '下書きを保存', name: 'ope[cmd]', value: 'save', class: 'btn btn-lg btn-default' | |
- if @article.draft? | |
= f.button '公開する', name: 'ope[cmd]', value: 'publish', class: 'btn btn-lg btn-default' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment