On 10/2/06, Andrew Kaspick <[EMAIL PROTECTED]> wrote:

I would guess it's that way because inplace editing should accept
anything you give it and deal with the input as is.  How would you
report back a failed validation?  An alert?

I'm guessing you probably don't want inplace editing for the text
you're trying to modify and if you do, you should update your logic to
convert any bad data into something that will work for you.  An
example being an inplace edit where you input html when it's not
allowed, and you simply remove the "invalid" html on the server side
to make it valid.

Anyway, that's my guess.


Thanx for the feedback.

In general though you don't write much when using an in_place**.  You use an in_place_edit_for in the controller to setup the methods, and use in_place_editor_field in the view. 

I think more importantly than reporting back that a validation failed, ( at the moment until I work out something) is the fact that there is no validation performed in the first place.

I could manually declare the methods in  the controller but I don't want to have to declare validation logic in my in_place editor methods (view/controller centric).  My model should look after it's own data.

I guess I could also overwrite update_attribute to use validataion, but why was validation removed from this method in the first place?  I don't want to go breaking things... 

Cheers





--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/rubyonrails-core
-~----------~----~----~----~------~----~------~--~---

Reply via email to