Sha256: fd95fae5a623880d5e6e602f80a65743b00f60405e291947b943fbd0d44bfb3d
Contents?: true
Size: 610 Bytes
Versions: 3
Compression:
Stored size: 610 Bytes
Contents
class AdminData::FeedController < AdminData::BaseController unloadable before_filter :ensure_is_allowed_to_view_feed def index render :text => "Usage: http://localhost:3000/admin_data/feed/<model name>" and return if params[:klasss].blank? begin @klass = AdminData::Util.camelize_constantize(params[:klasss]) rescue NameError => e render :text => "No constant was found with name #{params[:klasss]}" and return end end private def ensure_is_allowed_to_view_feed render :text => 'not authorized' unless AdminData::Util.is_allowed_to_view_feed?(self) end end
Version data entries
3 entries across 3 versions & 1 rubygems