diff options
author | Joachim Filip Ignacy Bartosik <jbartosik@gmail.com> | 2011-06-27 17:36:20 +0200 |
---|---|---|
committer | Joachim Filip Ignacy Bartosik <jbartosik@gmail.com> | 2011-06-27 17:36:20 +0200 |
commit | 232f45b7a5b4096e10cfc34edd080e7605b06c1b (patch) | |
tree | a3191aec7e916610354d4f901945f9a1c0a10b03 /site/app | |
parent | Bot posts log to the website (diff) | |
download | council-webapp-232f45b7a5b4096e10cfc34edd080e7605b06c1b.tar.gz council-webapp-232f45b7a5b4096e10cfc34edd080e7605b06c1b.tar.bz2 council-webapp-232f45b7a5b4096e10cfc34edd080e7605b06c1b.zip |
Application receives meeting log from IRC bot
Diffstat (limited to 'site/app')
-rw-r--r-- | site/app/controllers/agendas_controller.rb | 2 | ||||
-rw-r--r-- | site/app/models/agenda.rb | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/site/app/controllers/agendas_controller.rb b/site/app/controllers/agendas_controller.rb index 18a178d..669f364 100644 --- a/site/app/controllers/agendas_controller.rb +++ b/site/app/controllers/agendas_controller.rb @@ -17,6 +17,8 @@ class AgendasController < ApplicationController data = JSON.parse(request.env["rack.input"].read) Agenda.update_voting_options data['agenda'] Agenda.process_results data data['votes'] + agenda = Agenda.current + agenda.meeting_log = data['lines'] Participation.mark_participations data end diff --git a/site/app/models/agenda.rb b/site/app/models/agenda.rb index 46cf2d8..5580828 100644 --- a/site/app/models/agenda.rb +++ b/site/app/models/agenda.rb @@ -5,6 +5,7 @@ class Agenda < ActiveRecord::Base fields do meeting_time :datetime email_reminder_sent :boolean, :null => false, :default => false + meeting_log :text, :null => false, :default => '' timestamps end @@ -32,7 +33,10 @@ class Agenda < ActiveRecord::Base end def update_permitted? - acting_user.council_member? || acting_user.administrator? + return false if meeting_log_changed? + return true if acting_user.council_member? + return true if acting_user.administrator? + false end def destroy_permitted? |