Displaying 2 results from an estimated 2 matches for "disabled_at".
Did you mean:
disable_it
2007 May 11
3
is_active?
Hey all, i''m rather new to rails and was curious if ActiveRecord
implemented anything like is_active where the delete functions would
just mark records as inactive, vs deleting rows. (similar to created_at,
etc). I need a history of transactions, and this is how I would code in
other languages. Any advice? Is there are smarter way to implement this?
Thanks in advance!
--
Posted via
2009 Oct 27
5
Re-tasking destroy contoller action...is this bad practice?
...d I
want my administrators to be able to disable authors. I don''t want to
delete authors because this would cause data integrity issues
(orphaned Author foreign key in the Post model). So my plan is to re-
task the destroy method of the AuthorsContoller to allow an
administrator to set a disabled_at timestamp on an Author instead of
actually deleting him.
What are the disadvantages to this design? One of the advantages to
this design that I see is that I don''t have to declare a new
controller method in my routes...it just fits into the REST design as
is, no? Thanks for any advice.