2015-10-13 16:38:33 -04:00
|
|
|
class Admin::VersionsController < Admin::BaseController
|
|
|
|
before_action :set_version, only: [:show]
|
|
|
|
|
|
|
|
def show
|
|
|
|
type = @version.class.to_s.underscore
|
|
|
|
instance_variable_set('@' + type, @version)
|
|
|
|
|
|
|
|
render "admin/#{type.pluralize}/show"
|
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def set_version
|
2015-10-14 08:45:24 -04:00
|
|
|
@version = PaperTrail::Version.find(params[:id]).reify(has_one: true)
|
2015-10-13 16:38:33 -04:00
|
|
|
end
|
|
|
|
end
|