democracyworks / hat-trick

Hat Trick - Rails wizards done right
MIT License
5 stars 0 forks source link

Provide access to model object in step blocks #11

Closed paulschreiber closed 12 years ago

paulschreiber commented 12 years ago

Provide access to model object in step blocks

step :foo do
  voter.name
end

Right now, it's only available in before and after block inside the step block.

cap10morgan commented 12 years ago

The model object doesn't exist when the step block is evaluated, so this can't be done.

I think what you want instead is for button_to's to work inside before blocks (which can access the model object).

paulschreiber commented 12 years ago

I do want that, but I figured asking for something more general was better.