ruby on rails - Active record "date" and "nationality" function giving me error. (Undefined method) -


i trying create profile page can input "born_on". using

class createwinemakers < activerecord::migration   def change     create_table :wine_makers |t|       t.string :name        t.date :born_on       t.text :nationality       t.text :profile        t.text :wine        t.integer :wine_list_id       t.timestamps     end       add_index :wine_makers, :wine_list_id     end  end 

here view file.

<%= simple_form_for winemaker.new |f| %>      <%= f.input :name %>      <%= f.input :profile %>      <%= f.input :wine %>      <%= f.input :born_on %>      <br/>      <%= f.submit "create", :class => 'btn btn-primary' %> <% end %> 

the "born_on" giving me error saying method not defined. confused since other inputs working except "born_on" , "nationality". before, "born_on" named "birth_date", , thought naming convention wrong , changed "born_on". here controller.

class winemakerscontroller < applicationcontroller      def new       @wine_maker = winemaker.new     end      def create       @wine_maker = winemaker.create(wine_maker_params)       redirect_to wine_list_path(@wine_list)     end       def show     end      private      def wine_maker_params     params.require(:wine_maker).permit(:name, :born_on, :nationality,   :profile, :wine )     end end 

this seems such easy question couldn't find similar problems..

thank you.


Comments

Popular posts from this blog

What Are The Best Universities In The World?

The Ten Most Livable Cities In The World

Hard vs. Soft Water: What's The Difference?