Class: Admin::TweetsController

Inherits:
AdminCartoonistController
  • Object
show all
Defined in:
app/controllers/admin/tweets_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject


17
18
19
20
21
# File 'app/controllers/admin/tweets_controller.rb', line 17

def create
  @tweet = Tweet.create_tweet params
  send_tweet_if_requested
  tweet_or_entity_redirect
end

#editObject


7
8
9
# File 'app/controllers/admin/tweets_controller.rb', line 7

def edit
  @tweet = Tweet.find params[:id].to_i
end

#indexObject


2
3
4
5
# File 'app/controllers/admin/tweets_controller.rb', line 2

def index
  @untweeted = Tweet.untweeted.created_chronological.not_disabled
  @tweeted = Tweet.tweeted.reverse_chronological
end

#updateObject


11
12
13
14
15
# File 'app/controllers/admin/tweets_controller.rb', line 11

def update
  @tweet = Tweet.update_tweet params
  send_tweet_if_requested
  tweet_or_entity_redirect
end