ruby on rails - How To update the date in Postgresql db -


i want save date in postgresql database. therefore have written following code in controller:

def create     @app_config = appconfig.new(app_config_params).to_date     @app_config.save     respond_with(@app_config)   end    private    def app_config_params     params.require(:app_config).permit(:freeze_attendance_till)   end 

but throwing error this:

actioncontroller::parametermissing (param missing or value empty) 

so unable save date in db. doing wrong?

i created database using following code:

class createappconfigs < activerecord::migration   def change     create_table :app_configs |t|       t.date :freeze_attendance_till       t.timestamps null: false     end   end end 


Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -