Class: HashtagsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
lib/generators/simple_hashtag/templates/views/hashtags_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



3
4
5
# File 'lib/generators/simple_hashtag/templates/views/hashtags_controller.rb', line 3

def index
  @hashtags = SimpleHashtag::Hashtag.all
end

#showObject



7
8
9
10
# File 'lib/generators/simple_hashtag/templates/views/hashtags_controller.rb', line 7

def show
  @hashtag = SimpleHashtag::Hashtag.find_by_name(params[:hashtag])
  @hashtagged = @hashtag.hashtaggables if @hashtag
end