moved some donmai-specific stuff out of default config
This commit is contained in:
@@ -2,8 +2,8 @@ class ArtistVersionsController < ApplicationController
|
||||
respond_to :html, :xml, :json
|
||||
|
||||
def index
|
||||
@artist = Artist.find(params[:artist_id])
|
||||
@artist_versions = ArtistVersion.paginate :order => "version desc", :per_page => 25, :page => params[:page], :conditions => ["artist_id = ?", @artist.id]
|
||||
@search = Artist.search(params[:search])
|
||||
@artist_versions = @search.paginate :order => "version desc", :per_page => 25, :page => params[:page]
|
||||
respond_with(@artist_versions)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,19 +1,36 @@
|
||||
class BansController < ApplicationController
|
||||
def new
|
||||
@ban = Ban.new
|
||||
end
|
||||
|
||||
def edit
|
||||
@ban = Ban.find(params[:id])
|
||||
end
|
||||
|
||||
def index
|
||||
@search = Ban.search(params[:search])
|
||||
@bans = @search.paginate(:page => params[:page])
|
||||
end
|
||||
|
||||
def show
|
||||
@ban = Ban.find(params[:id])
|
||||
end
|
||||
|
||||
def create
|
||||
@ban = Ban.new(params[:ban])
|
||||
if @ban.save
|
||||
redirect_to ban_path(@ban)
|
||||
else
|
||||
render :action => "new"
|
||||
end
|
||||
end
|
||||
|
||||
def update
|
||||
@ban = Ban.find(params[:id])
|
||||
if @ban.update_attributes(params[:ban])
|
||||
redirect_to ban_path(@ban)
|
||||
else
|
||||
render :action => "edit"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,19 +1,37 @@
|
||||
class ForumPostsController < ApplicationController
|
||||
def new
|
||||
@forum_post = ForumPost.new(:topic_id => params[:topic_id])
|
||||
end
|
||||
|
||||
def edit
|
||||
@forum_post = ForumPost.find(params[:id])
|
||||
end
|
||||
|
||||
def show
|
||||
@forum_post = ForumPost.find(params[:id])
|
||||
end
|
||||
|
||||
def create
|
||||
@forum_post = ForumPost.new(params[:forum_post])
|
||||
if @forum_post.save
|
||||
redirect_to forum_post_path(@forum_post)
|
||||
else
|
||||
render :action => "new"
|
||||
end
|
||||
end
|
||||
|
||||
def update
|
||||
@forum_post = ForumPost.find(params[:id])
|
||||
if @forum_post.update_attributes(params[:forum_post])
|
||||
redirect_to forum_post_path(@forum_post)
|
||||
else
|
||||
render :action => "edit"
|
||||
end
|
||||
end
|
||||
|
||||
def destroy
|
||||
@forum_post = ForumPost.find(params[:id])
|
||||
@forum_post.destroy
|
||||
redirect_to forum_topic_path(@forum_post.topic_id)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,22 +1,42 @@
|
||||
class ForumTopicsController < ApplicationController
|
||||
def new
|
||||
@forum_topic = ForumTopic.new
|
||||
end
|
||||
|
||||
def edit
|
||||
@forum_topic = ForumTopic.find(params[:id])
|
||||
end
|
||||
|
||||
def index
|
||||
@search = ForumTopic.search(params[:search])
|
||||
@forum_topics = @search.paginate(:page => params[:page], :order => "updated_at DESC")
|
||||
end
|
||||
|
||||
def show
|
||||
@forum_topic = ForumTopic.find(params[:id])
|
||||
end
|
||||
|
||||
def create
|
||||
@forum_topic = ForumTopic.new(params[:forum_topic])
|
||||
if @forum_topic.save
|
||||
redirect_to forum_topic_path(@forum_topic)
|
||||
else
|
||||
render :action => "new"
|
||||
end
|
||||
end
|
||||
|
||||
def update
|
||||
@forum_topic = ForumTopic.find(params[:id])
|
||||
if @forum_topic.update_attributes(params[:forum_topic])
|
||||
redirect_to forum_topic_path(@forum_topic)
|
||||
else
|
||||
render :action => "edit"
|
||||
end
|
||||
end
|
||||
|
||||
def destroy
|
||||
@forum_topic = ForumTopic.find(params[:id])
|
||||
@forum_topic.destroy
|
||||
redirect_to forum_topics_path
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user