liquid_feedback_frontend
view app/main/initiative/_action/update_ignore.lua @ 466:e15e8b15ccf5
Show all issues as default in issue list
| author | bsw | 
|---|---|
| date | Tue Mar 13 20:21:48 2012 +0100 (2012-03-13) | 
| parents | 955bd41e1559 | 
| children | 
 line source
     1 local member = app.session.member
     2 local initiative = Initiative:by_id(param.get_id())
     4 local ignore_initiative = IgnoredInitiative:by_pk(member.id, initiative.id)
     6 if param.get("delete", atom.boolean) then
     7   if ignore_initiative then
     8     ignore_initiative:destroy()
     9   end
    10   return
    11 end
    13 if not ignore_initiative then
    14   ignore_initiative = IgnoredInitiative:new()
    15   ignore_initiative.member_id = member.id
    16   ignore_initiative.initiative_id = initiative.id
    17   ignore_initiative:save()
    18 end
