File: post.rb

package info (click to toggle)
ruby-state-machines-activerecord 0.9.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 340 kB
  • sloc: ruby: 1,922; makefile: 5
file content (11 lines) | stat: -rw-r--r-- 212 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
ActiveRecord::Base.connection.create_table(:posts, :force => true) do |t|
  t.string :title
  t.string :content
  t.string :state
end

class Post < ActiveRecord::Base
  state_machine initial: :draft do

  end
end