I am trying to insert data in my database using ActiveRecord.
When I use pdays = MyModel.new for initialization rather then the below find_or_initiali
pdays = MyModel.new
find_or_initiali
You could try:
MyModel.find_or_initialize_by_local_dt_and_comunity_id([:local_dt], vdays[:community_id])
appending the columns names by with an _and_
_and_