aw yeah
This commit is contained in:
parent
76c614ea66
commit
b25c419e52
|
@ -34,10 +34,10 @@ class Ajax::InboxController < ApplicationController
|
|||
return
|
||||
end
|
||||
|
||||
a = nil
|
||||
answer = nil
|
||||
|
||||
begin
|
||||
a = inbox.answer params[:answer], current_user
|
||||
answer = inbox.answer params[:answer], current_user
|
||||
rescue
|
||||
@status = :err
|
||||
@message = "An error occurred"
|
||||
|
@ -45,8 +45,10 @@ class Ajax::InboxController < ApplicationController
|
|||
return
|
||||
end
|
||||
|
||||
Thread.new do
|
||||
current_user.services.each do |service|
|
||||
service.post a
|
||||
service.post answer
|
||||
end
|
||||
end
|
||||
|
||||
@status = :okay
|
||||
|
|
|
@ -31,10 +31,12 @@ class Services::Twitter < Service
|
|||
answer_content = answer.content
|
||||
answer_url = show_user_answer_url(
|
||||
id: answer.id,
|
||||
username: answer.user.screen_name
|
||||
username: answer.user.screen_name,
|
||||
host: APP_CONFIG['hostname'],
|
||||
protocol: (APP_CONFIG['https'] ? :https : :http)
|
||||
)
|
||||
Rails.logger.debug "answer_url => #{answer_url}"
|
||||
"#{question_content[0..55]}#{'…' if question_content.length > 56}" \
|
||||
" — #{answer_content[0..55]}#{'…' if answercontent.length > 56} #{answer_url}"
|
||||
" — #{answer_content[0..55]}#{'…' if answer_content.length > 56} #{answer_url}"
|
||||
end
|
||||
end
|
|
@ -1,6 +1,9 @@
|
|||
# The site name, shown everywhere.
|
||||
site_name: "justask"
|
||||
|
||||
hostname: "justask.rrerr.net"
|
||||
https: true
|
||||
|
||||
# Name of the "Anonymous" user. (e.g. "Anonymous Coward", "Arno Nym", "Mr. X", ...)
|
||||
anonymous_name: "Anonymous"
|
||||
|
||||
|
|
Loading…
Reference in New Issue