I got blocked while trying to get the right value after value overwriting before submitting the form from a CircleCreateService
From my Circle create Service I have this:
when 'User never create a circle'
when 'User has created once'
when 'User has created many'
And this is what I saved into my database. So my problem is, from my form, when I am trying to edit the Circle, how can I get the old value from the db using a helper method to render corresponding option based on the retrieved data from my db?
This is my helper method:
'User never create a circle'
'User has created once'
'User has created many'
And in my form I use this:
<%= select_tag :c_options,
class: "form-control" %>
the it says:
undefined methodmap' for nil:NilClass
Did you mean? tap`
ruby-on-rails ruby ruby-on-rails-4 ruby-on-rails-5