Unverified Commit 2e0b3826 authored by cmrd Senya's avatar cmrd Senya Committed by Benjamin Neff
Browse files

Use 'post' prefix for status message route helpers

This is required to make url_for(StatusMessage.new) work
parent ac868c9c
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -37,6 +37,10 @@ class StatusMessage < Post
    owned_or_visible_by_user(person.owner).joins(:mentions).where(mentions: {person_id: person.id})
  }

  def self.model_name
    Post.model_name
  end

  def self.guids_for_author(person)
    Post.connection.select_values(Post.where(:author_id => person.id).select('posts.guid').to_sql)
  end
+1 −1
Original line number Diff line number Diff line
.row.publisher#publisher{class: ((aspect == :profile || publisher_open?) ? "mention_popup" : "closed")}
  .content_creation
    = form_for(StatusMessage.new) do |status|
    = form_for StatusMessage.new, url: status_messages_path, as: :status_message do |status|
      = status.error_messages
      %params
        .publisher-textarea-wrapper#publisher-textarea-wrapper
+2 −1
Original line number Diff line number Diff line
@@ -2,7 +2,8 @@
-#   licensed under the Affero General Public License version 3 or later.  See
-#   the COPYRIGHT file.

= form_for StatusMessage.new, html: {class: "control-group", data: {ajax: false}} do |status|
= form_for StatusMessage.new, url: status_messages_path, as: :status_message,
    html: {class: "control-group", data: {ajax: false}} do |status|
  .form-group
    = status.hidden_field :provider_display_name, value: 'mobile'
    = status.text_area :text, placeholder: t('shared.publisher.whats_on_your_mind'), rows: 4, autofocus: "autofocus", class: "form-control"