Ruby on Rails - concatenate strings on save to database upon user clicking create action
Its late and I probably should sleep on this. Easy one I have 3 fields in a form which a user fills in. Once they click the create button these records are saved to the database. Simple. However I want the data from these three fields at the same time to be concatenated together, nothing fancy..and inserted to the database at the same time as the other records. This should reflect back to the user on the show page after they create. So I need an action to concatenate 3 db columns lets say column names are firstname, surname and DOB. table name PeopleDetails I have tried building the model