diff options
author | re4k <re4k@re4k.info> | 2013-03-19 01:47:22 +0900 |
---|---|---|
committer | re4k <re4k@re4k.info> | 2013-03-19 01:48:52 +0900 |
commit | 5227f1b8c7dae086d14a5b6f8251ac63fec93c44 (patch) | |
tree | 726937a8b0cae476ea21943cc57ea7f6fd6db3ea /app/helpers | |
parent | 98e49ee3308759913477338be95ca07b781355f0 (diff) | |
download | aclog-5227f1b8c7dae086d14a5b6f8251ac63fec93c44.tar.gz |
Minor changes
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/application_helper.rb | 32 | ||||
-rw-r--r-- | app/helpers/errors_helper.rb | 2 | ||||
-rw-r--r-- | app/helpers/i_helper.rb | 2 | ||||
-rw-r--r-- | app/helpers/main_helper.rb | 2 | ||||
-rw-r--r-- | app/helpers/sessions_helper.rb | 2 | ||||
-rw-r--r-- | app/helpers/users_helper.rb | 2 |
6 files changed, 1 insertions, 41 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 93f7063..a41f15d 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -18,37 +18,7 @@ module ApplicationHelper format_tweet_text(text) end - def status_url(tweet) - "/#{u(tweet).screen_name}/status/#{tweet.id}" - end - def twitter_status_url(tweet) - "https://twitter.com/#{u(tweet).screen_name}/status/#{tweet.id}" - end - - def user_url(object) - "/#{u(object).screen_name}" - end - - def u(object) - if object.is_a?(Tweet) || - object.is_a?(Favorite) || - object.is_a?(Retweet) || - object.is_a?(Account) - u(object.user_id) - elsif object.is_a?(User) - object - elsif object.is_a?(Fixnum) || - object.is_a?(Bignum) - @user_cache[object] || User.new(object) - end - end - - def favoriters(item) - (@favorite_cache[item.id] || []).map{|m| u(m)} - end - - def retweeters(item) - (@retweet_cache[item.id] || []).map{|m| u(m)} + "https://twitter.com/#{tweet.user.screen_name}/status/#{tweet.id}" end end diff --git a/app/helpers/errors_helper.rb b/app/helpers/errors_helper.rb deleted file mode 100644 index 8e3b415..0000000 --- a/app/helpers/errors_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module ErrorsHelper -end diff --git a/app/helpers/i_helper.rb b/app/helpers/i_helper.rb deleted file mode 100644 index ef8bff0..0000000 --- a/app/helpers/i_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module IHelper -end diff --git a/app/helpers/main_helper.rb b/app/helpers/main_helper.rb deleted file mode 100644 index 826effe..0000000 --- a/app/helpers/main_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module MainHelper -end diff --git a/app/helpers/sessions_helper.rb b/app/helpers/sessions_helper.rb deleted file mode 100644 index 309f8b2..0000000 --- a/app/helpers/sessions_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module SessionsHelper -end diff --git a/app/helpers/users_helper.rb b/app/helpers/users_helper.rb deleted file mode 100644 index 2310a24..0000000 --- a/app/helpers/users_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module UsersHelper -end |