Class: EricWeixin::Cms::Weixin::TwoDimensionCodesController
- Inherits:
-
BaseController
- Object
- BaseController
- EricWeixin::Cms::Weixin::TwoDimensionCodesController
- Defined in:
- app/controllers/eric_weixin/cms/weixin/two_dimension_codes_controller.rb
Instance Method Summary collapse
- #create ⇒ Object
-
#index ⇒ Object
before_action :set_weixin_article_data, only: [:show, :edit, :update, :destroy].
- #new ⇒ Object
- #show ⇒ Object
Instance Method Details
#create ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# File 'app/controllers/eric_weixin/cms/weixin/two_dimension_codes_controller.rb', line 11 def create begin @two_dimension_code = ::EricWeixin::TwoDimensionCode.get_long_time_two_dimension_code(two_dimension_code_params) redirect_to cms_weixin_two_dimension_code_path(@two_dimension_code.id) rescue Exception => e dispose_exception e = get_notice_str redirect_to new_cms_weixin_two_dimension_code_path end end |
#index ⇒ Object
before_action :set_weixin_article_data, only: [:show, :edit, :update, :destroy]
3 4 5 |
# File 'app/controllers/eric_weixin/cms/weixin/two_dimension_codes_controller.rb', line 3 def index @two_dimension_codes = ::EricWeixin::TwoDimensionCode.where("action_info <> ?", '') end |
#new ⇒ Object
22 23 24 25 |
# File 'app/controllers/eric_weixin/cms/weixin/two_dimension_codes_controller.rb', line 22 def new @two_dimension_code = ::EricWeixin::TwoDimensionCode.new @public_accounts = ::EricWeixin::PublicAccount.all end |
#show ⇒ Object
7 8 9 |
# File 'app/controllers/eric_weixin/cms/weixin/two_dimension_codes_controller.rb', line 7 def show @two_dimension_code = ::EricWeixin::TwoDimensionCode.find(params[:id]) end |