Sha256: a088297ee9e9a855143b986767d3dfb80548082ccbdf4d678735946902b571ca
Contents?: true
Size: 612 Bytes
Versions: 21
Compression:
Stored size: 612 Bytes
Contents
module Ems module ArticlesHelper # create the form URL. Depends on whether or its an edit or a new def article_form_url if params[:action].eql? "edit" or params[:action].eql? "update" return category_article_path(@article.category, @article) else return category_articles_path(@article.category) end end # Make sure we give the user only the status that is allowed with the holding roles def allowed_status status = [:draft, :pending] if can? :publish, @article status << :live end return status end end end
Version data entries
21 entries across 21 versions & 1 rubygems