diff options
| author | hukl <contact@smyck.org> | 2010-05-09 11:34:10 +0200 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2010-05-09 11:34:10 +0200 |
| commit | 65c067621048a8e8ec72d2c47d17d5dafb2dcf84 (patch) | |
| tree | bbe28ce119a4a2e5555ec9c4be4a01b6f42ea43f | |
| parent | f169cd4b7b4f2c6d39efb917ef88065d72c48d9d (diff) | |
added index action for tags, primarily removing the associated exception
| -rw-r--r-- | app/controllers/tags_controller.rb | 3 | ||||
| -rw-r--r-- | app/views/tags/index.html.erb | 7 |
2 files changed, 8 insertions, 2 deletions
diff --git a/app/controllers/tags_controller.rb b/app/controllers/tags_controller.rb index aef6e83..fe3380d 100644 --- a/app/controllers/tags_controller.rb +++ b/app/controllers/tags_controller.rb | |||
| @@ -3,6 +3,9 @@ class TagsController < ApplicationController | |||
| 3 | # Public | 3 | # Public |
| 4 | 4 | ||
| 5 | def index | 5 | def index |
| 6 | @page = Page.new :title => "Tags" | ||
| 7 | |||
| 8 | @tags = Tag.all(:limit => 500) | ||
| 6 | end | 9 | end |
| 7 | 10 | ||
| 8 | def show | 11 | def show |
diff --git a/app/views/tags/index.html.erb b/app/views/tags/index.html.erb index 19cf908..b962b65 100644 --- a/app/views/tags/index.html.erb +++ b/app/views/tags/index.html.erb | |||
| @@ -1,2 +1,5 @@ | |||
| 1 | <h1>Tags#index</h1> | 1 | <h1>Tags</h1> |
| 2 | <p>Find me in app/views/tags/index.html.erb</p> | 2 | |
| 3 | <% @tags.each do |tag| %> | ||
| 4 | <span><%= link_to tag, tag_path(tag.name.parameterize) %></span> | ||
| 5 | <% end %> \ No newline at end of file | ||
