Skip to content

Instantly share code, notes, and snippets.

@negabaro
Created October 17, 2017 20:55
Show Gist options
  • Save negabaro/2338b829d8ea95e6e5460109485a792b to your computer and use it in GitHub Desktop.
Save negabaro/2338b829d8ea95e6e5460109485a792b to your computer and use it in GitHub Desktop.
Rails AASM view example
= 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