Skip to content

Commit

Permalink
cleanup for history [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
bbenezech committed Nov 4, 2011
1 parent de0bd1b commit debd8ae
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 13 deletions.
10 changes: 2 additions & 8 deletions app/controllers/rails_admin/history_controller.rb
@@ -1,13 +1,7 @@
module RailsAdmin
class HistoryController < RailsAdmin::ApplicationController
before_filter :get_model, :except => [:list]
before_filter :get_object, :except => [:list, :for_model]

def list
@authorization_adapter.authorize(:history) if @authorization_adapter
@history = History.all.limit(100)
render :template => 'rails_admin/main/history', :layout => false
end
before_filter :get_model
before_filter :get_object, :except => :for_model

def for_model
@authorization_adapter.authorize(:history) if @authorization_adapter
Expand Down
1 change: 0 additions & 1 deletion app/views/rails_admin/main/_dragonfly_file.html.haml
Expand Up @@ -2,7 +2,6 @@
.row
- if field.bindings[:object].send(field.name).mime_type.include? 'image'
= image_tag(field.bindings[:object].send(field.name).thumb("450x100").url)
%br
- else
= link_to field.bindings[:object].send(field.name).url, field.bindings[:object].send(field.name).url
.row
Expand Down
1 change: 0 additions & 1 deletion app/views/rails_admin/main/_file_upload.html.haml

This file was deleted.

1 change: 0 additions & 1 deletion config/routes.rb
@@ -1,7 +1,6 @@
RailsAdmin::Engine.routes.draw do
scope "history", :as => "history" do
controller "history" do
match "/list", :to => :list, :as => "list"
match "/:model_name", :to => :for_model, :as => "model"
match "/:model_name/:id", :to => :for_object, :as => "object"
end
Expand Down
4 changes: 2 additions & 2 deletions lib/rails_admin/config/fields/types/file_upload.rb
Expand Up @@ -5,9 +5,9 @@ module Config
module Fields
module Types
class FileUpload < RailsAdmin::Config::Fields::Types::String

# Register field type for the type loader
RailsAdmin::Config::Fields::Types::register(self)


end
end
end
Expand Down

0 comments on commit debd8ae

Please sign in to comment.