Displaying 1 result from an estimated 1 matches for "addsubtask".
2010 Jan 25
9
skinny Controllers, fat models with REST?
...ollers, fat models.
My Controllers are really fat now. So i''m asking myself how can i
shrink my controllers and move the code to the models, especially in
fact of REST e.g. in focus on error codes?
code example:
# POST /tasks
# POST /tasks.xml
def create
@authorized = false
@addsubtask=false
@task = Task.new(params[:task])
if(@task.parent_id != nil ) #wenn parent id nicht leer ist
ueberpruefe ob Rechte fuer Uebertask da sind
#if ( current_user.is_owner_of? Task.find(@task.parent_id) ) ||
( current_user.is_moderator_of? Task.find(@task.parent_id) )
if ( current...