Sha256: bdd0a952c0651e40f165ba4d7b182eda5b0609b4d4fa7f68d2d6434220ee14a4

Contents?: true

Size: 636 Bytes

Versions: 12

Compression:

Stored size: 636 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', :status => :unauthorized unless AdminData::Util.is_allowed_to_view_feed?(self)
  end

end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
admin_data-1.0.15 app/controllers/admin_data/feed_controller.rb
admin_data-1.0.14 app/controllers/admin_data/feed_controller.rb
admin_data-1.0.13 app/controllers/admin_data/feed_controller.rb
admin_data-1.0.12 app/controllers/admin_data/feed_controller.rb
admin_data-1.0.11 app/controllers/admin_data/feed_controller.rb
admin_data-1.0.10 app/controllers/admin_data/feed_controller.rb
admin_data-1.0.9 app/controllers/admin_data/feed_controller.rb
admin_data-1.0.8 app/controllers/admin_data/feed_controller.rb
admin_data-1.0.7 app/controllers/admin_data/feed_controller.rb
admin_data-1.0.6 app/controllers/admin_data/feed_controller.rb
admin_data-1.0.5 app/controllers/admin_data/feed_controller.rb
admin_data-1.0.4 app/controllers/admin_data/feed_controller.rb