Class: EricWeixin::Article

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/eric_weixin/article.rb

Class Method Summary collapse

Class Method Details

.create_article_data(options) ⇒ Object



9
10
11
12
13
14
15
# File 'app/models/eric_weixin/article.rb', line 9

def create_article_data options
  ::EricWeixin::Article.transaction do
    article = ::EricWeixin::Article.new(options)
    article.save!
    article
  end
end