diff --git a/app/assets/stylesheets/publisher.css.scss b/app/assets/stylesheets/publisher.css.scss index 08ff3cec0dc8e932181072e119d42d853b8157d4..76bce5669d889aa4cd6e8d97dac5675ffc062be2 100644 --- a/app/assets/stylesheets/publisher.css.scss +++ b/app/assets/stylesheets/publisher.css.scss @@ -59,7 +59,6 @@ resize: none; height: 50px; } - } &.active textarea { min-height: 70px; @@ -79,7 +78,6 @@ line-height: 20px !important; width: 100% !important; } - } &.with_attachments .row-fluid#photodropzone_container { border-top: 1px dashed $border-grey; diff --git a/app/models/poll.rb b/app/models/poll.rb index 778f654ca8620a74e3ef3ab475d9ab19ac7006db..df01f127ab6798194aba48cc29cd55800c5ae0af 100644 --- a/app/models/poll.rb +++ b/app/models/poll.rb @@ -15,7 +15,7 @@ class Poll < ActiveRecord::Base validate :enough_poll_answers def enough_poll_answers - errors.add(:poll_answers, I18n.t("activerecord.errors.models.poll.attributes.poll_answers.not_enough_poll_answers")) if poll_answers.size < 2 + errors.add(:poll_answers, I18n.t("activerecord.errors.models.poll.attributes.poll_answers.not_enough_poll_answers")) if poll_answers.size < 2 end end diff --git a/app/models/poll_answer.rb b/app/models/poll_answer.rb index 14ee658cf713f434f28def1059d9ff926821abb6..46421266d9910a334a021f0ff11e816f01b669c8 100644 --- a/app/models/poll_answer.rb +++ b/app/models/poll_answer.rb @@ -9,8 +9,8 @@ class PollAnswer < ActiveRecord::Base xml_attr :answer def update_vote_counter - self.vote_count = self.vote_count + 1 - self.save! + self.vote_count = self.vote_count + 1 + self.save! end end diff --git a/app/models/poll_participation.rb b/app/models/poll_participation.rb index c6c2ee85c7c1a2ef7d001c260171bd52708db2d2..c666e50307002357c922408a062f799071c2d1e7 100644 --- a/app/models/poll_participation.rb +++ b/app/models/poll_participation.rb @@ -52,7 +52,7 @@ class PollParticipation < ActiveRecord::Base existing = PollParticipation.where(author_id: self.author.id, poll_id: self.poll.id) if existing.first != self and existing.count != 0 - self.errors.add(:poll, I18n.t("errors.models.poll_participations.attributes.poll.already_participated")) + self.errors.add(:poll, I18n.t("activerecord.errors.models.poll_participations.attributes.poll.already_participated")) end end diff --git a/spec/models/poll_participation_spec.rb b/spec/models/poll_participation_spec.rb index 26fbd10fc41ca207d7e11124447f7b5faa2932bb..c09ae06aa1e8cdfa8db1854ada397c87280409ff 100644 --- a/spec/models/poll_participation_spec.rb +++ b/spec/models/poll_participation_spec.rb @@ -29,7 +29,7 @@ describe PollParticipation do end - describe 'xml' do + describe 'xml' do before do @poll_participant = FactoryGirl.create(:user) @poll_participant_aspect = @poll_participant.aspects.create(:name => "bruisers") @@ -75,22 +75,22 @@ describe PollParticipation do end describe 'it is relayable' do - before do - @local_luke, @local_leia, @remote_raphael = set_up_friends - @remote_parent = FactoryGirl.build(:status_message_with_poll, :author => @remote_raphael) + before do + @local_luke, @local_leia, @remote_raphael = set_up_friends + @remote_parent = FactoryGirl.build(:status_message_with_poll, :author => @remote_raphael) - @local_parent = @local_luke.post :status_message, :text => "hi", :to => @local_luke.aspects.first + @local_parent = @local_luke.post :status_message, :text => "hi", :to => @local_luke.aspects.first @poll2 = Poll.new(:question => 'Who is now in charge?') @poll2.poll_answers.build(:answer => "a") @poll2.poll_answers.build(:answer => "b") @local_parent.poll = @poll2 - @object_by_parent_author = @local_luke.participate_in_poll!(@local_parent, @poll2.poll_answers.first) - @object_by_recipient = @local_leia.participate_in_poll!(@local_parent, @poll2.poll_answers.first) - @dup_object_by_parent_author = @object_by_parent_author.dup + @object_by_parent_author = @local_luke.participate_in_poll!(@local_parent, @poll2.poll_answers.first) + @object_by_recipient = @local_leia.participate_in_poll!(@local_parent, @poll2.poll_answers.first) + @dup_object_by_parent_author = @object_by_parent_author.dup - @object_on_remote_parent = @local_luke.participate_in_poll!(@remote_parent, @remote_parent.poll.poll_answers.first) - end + @object_on_remote_parent = @local_luke.participate_in_poll!(@remote_parent, @remote_parent.poll.poll_answers.first) + end let(:build_object) { PollParticipation::Generator.new(alice, @status, @poll.poll_answers.first).build } it_should_behave_like 'it is relayable'