I’ve added an extra method to my model in rails, let’s just say it is:
def subscribed
true
end
If I create a form with:
<%= f.check_box :subscribed %>
it correctly prints a ticked checkbox, but on submission of the form it says
unknown attribute: subscribed
What am I doing wrong?
Add an attribute accessor like this: