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

Version Path
admin_data-1.0.18 app/controllers/admin_data/feed_controller.rb
admin_data-1.0.17 app/controllers/admin_data/feed_controller.rb
admin_data-1.0.16 app/controllers/admin_data/feed_controller.rb