# Modify values after update/create

**URL:** <https://www.ruby-forum.com/t/modify-values-after-update-create/170450>\
**Category:** Rails\
**Created:** [June 17, 2009, 7:04pm UTC](https://www.ruby-forum.com/t/modify-values-after-update-create/170450 "2009-06-17T19:04:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jdunneuk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/35a633/32.png) [@jdunneuk](https://www.ruby-forum.com/u/jdunneuk)\
**Post date:** [June 17, 2009, 7:04pm UTC](https://www.ruby-forum.com/t/modify-values-after-update-create/170450/1 "2009-06-17T19:04:47Z")

</div>

Hi Guys,

I’m playing with nested attributes (accepts\_nested\_attributes\_for).  
There are two models:

Location  
Event (Fields: title, at\_date, is\_booked, …)

Locations can have multiple events, and the events can be added and  
removed dynamically in the location-form with javascript (based on this  
tutorial: [http://www.railsforum.com/viewtopic.php?id=28447&p=1](http://www.railsforum.com/viewtopic.php?id=28447&p=1))

The field is\_booked should be true or false, depending on several  
conditions (f.e. at\_date has a specific value). Is there any way to  
change these values after update\_attributes() or should I solve this  
with javascript in the view? Is there any other way? Is it  
possible/advisable to change the params()-array?

Thanks a lot!
