Class: Gemgento::Magento::BaseController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ApplicationController
- Gemgento::Magento::BaseController
- Defined in:
- app/controllers/gemgento/magento/base_controller.rb
Direct Known Subclasses
AddressesController, CategoriesController, Email::Sales::CreditMemosController, Email::Sales::InvoicesController, Email::Sales::OrdersController, Email::Sales::ShipmentsController, EmailsController, InventoryController, OrdersController, PriceRulesController, ProductAttributeSetsController, ProductAttributesController, ProductsController, RecurringProfilesController, StoresController, UserGroupsController, UsersController
Instance Method Summary collapse
Instance Method Details
#validate_ip ⇒ Object
8 9 10 11 12 13 14 |
# File 'app/controllers/gemgento/magento/base_controller.rb', line 8 def validate_ip whitelist = Config[:magento][:ip_whitelist].to_s.split(',').map(&:strip) if Rails.env.production? && !whitelist.include?(request.remote_ip.to_s) raise ActionController::RoutingError.new('Not Found') end end |