Use 'post' prefix for status message route helpers
This is required to make url_for(StatusMessage.new) work
This commit is contained in:
parent
ac868c9c06
commit
2e0b382699
3 changed files with 7 additions and 2 deletions
|
|
@ -37,6 +37,10 @@ class StatusMessage < Post
|
||||||
owned_or_visible_by_user(person.owner).joins(:mentions).where(mentions: {person_id: person.id})
|
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)
|
def self.guids_for_author(person)
|
||||||
Post.connection.select_values(Post.where(:author_id => person.id).select('posts.guid').to_sql)
|
Post.connection.select_values(Post.where(:author_id => person.id).select('posts.guid').to_sql)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
.row.publisher#publisher{class: ((aspect == :profile || publisher_open?) ? "mention_popup" : "closed")}
|
.row.publisher#publisher{class: ((aspect == :profile || publisher_open?) ? "mention_popup" : "closed")}
|
||||||
.content_creation
|
.content_creation
|
||||||
= form_for(StatusMessage.new) do |status|
|
= form_for StatusMessage.new, url: status_messages_path, as: :status_message do |status|
|
||||||
= status.error_messages
|
= status.error_messages
|
||||||
%params
|
%params
|
||||||
.publisher-textarea-wrapper#publisher-textarea-wrapper
|
.publisher-textarea-wrapper#publisher-textarea-wrapper
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,8 @@
|
||||||
-# licensed under the Affero General Public License version 3 or later. See
|
-# licensed under the Affero General Public License version 3 or later. See
|
||||||
-# the COPYRIGHT file.
|
-# 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
|
.form-group
|
||||||
= status.hidden_field :provider_display_name, value: 'mobile'
|
= 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"
|
= status.text_area :text, placeholder: t('shared.publisher.whats_on_your_mind'), rows: 4, autofocus: "autofocus", class: "form-control"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue