hi all. I'm developing my latest rails app using a REST style. I've hit a bit of a problem with context however. Let's say I have an Item model. I'm using edit/update to handle the processing, but the model is edited differently depending on the context.
sometimes all I'm doing is changing a 'status' attribute and don't need to show the entire form. In other cases I could be editing associated objects along with the main objects, and then there are user permissions to consider. Some user can edit some of the attributes and others can't. Even confirmation messages stored in flash after a successful update vary. All these operations are essentially an edit/update but the different contexts make it more complicated. For now I'm using separate actions for each type of update so for example, changing the status is handled by /items/mark_as_sold. Another way I could do this is to have a url parameter in the call to edit or update and process the request differently depending on the context but this gets messy. How do other developers handle these situations? Is there a 'rails way' to do it? thanks ev -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.