I keep on getting:
Undefined method `model_name` for #<DonationForm:0x007ff62ca75470>
I'm pretty sure I'm missing something. I've followed the installation instruction and everything. What could be the reason?
Model:
class Donation < ApplicationRecord
belongs_to :campaign
has_many :anotherthings
end
Controller:
def new
@campaign = Campaign.new
@donation = DonationForm.new(Donation.new)
end
View:
<%= simple_form_for [@campaign, @donation] do |f| %>
<% end %>
Form object:
# app/forms/donation_form.rb
class DonationForm < Reform::Form
property :donation_amount
end