added ip addr search

This commit is contained in:
albert
2011-07-29 18:04:50 -04:00
parent 5da43c54f0
commit c8afd34d15
55 changed files with 406 additions and 189 deletions

View File

@@ -1,4 +1,6 @@
class FavoritesController < ApplicationController
before_filter :member_only
def index
if params[:tags]
redirect_to(posts_path(:tags => "fav:#{CurrentUser.name} #{params[:tags]}"))

View File

@@ -1,6 +1,7 @@
module Moderator
class IpAddrsController < ApplicationController
def index
@search = IpAddrSearch.new(params[:search])
end
def search

View File

@@ -40,6 +40,12 @@ class TagSubscriptionsController < ApplicationController
respond_with(@tag_subscription)
end
def posts
@user = User.find(params[:id])
@post_set = PostSets::Post.new("sub:#{@user.name} #{params[:tags]}", params[:page])
@posts = @post_set.posts
end
private
def check_privilege(tag_subscription)
raise User::PrivilegeError unless tag_subscription.editable_by?(CurrentUser.user)