democracyworks / hat-trick

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

model is nil #30

Open joao-j-souza opened 11 years ago

joao-j-souza commented 11 years ago

I tried to implement it and I got this error msg in console before render new form.

No model found in render args [{}]; model is nil

sengenbe commented 10 years ago

Same issue here. Seems to be sourced from render_with_hat_trick method in controller_hooks.rb. All the form fields are visible after view is rendered.

Output: Making new wizard instance new_with_hat_trick called No model found in render args []; model is nil Rendered vendor/bundle/gems/hat-trick-0.3.0/app/views/hat_trick/_wizard_meta.html.erb (0.9ms)

sengenbe commented 10 years ago

Also, submission of form results in the below. My model class is empty at the moment FWIW.

Making new wizard instance create_with_hat_trick called Completed 500 Internal Server Error in 5ms

NoMethodError - undefined method validation_group_classes' for ActiveRecord::Base:Class: activerecord (4.0.0) lib/active_record/dynamic_matchers.rb:22:inmethod_missing' hat-trick (0.3.0) lib/hat_trick/controller_helpers.rb:54:in setup_validation_group_for' hat-trick (0.3.0) lib/hat_trick/controller_hooks.rb:39:increate_hook' (eval):4:in `create_with_hat_trick'