reflect state from rails enum
Open
Nobody has claimed this yet.
feature request
- Dominant language
- Ruby
- Stars
- 5.2k
- Forks
- 644
- PR merge metrics
- No merged PRs in 30d
Description
when use enum: true option, bind all enum item to state automatically, do not repeat you self.
enum state: {
sleeping: 5,
running: 99
}
aasm :column => :state, :enum => true do
- state :sleeping, :initial => true
- state :running
end
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the ActiveRecord integration and the handling of the enum: true option. Verify how Rails enum values and the AASM state declarations currently interact, then define coverage for the example where enum items are reflected automatically and the explicit state declarations are removed. Done means the example preserves the expected initial state and transitions without duplication.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rails, ruby
- Domain
- backend, databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100