noosfero | Move contents (!1270)

Rodrigo Souto gitlab at mg.gitlab.com
Thu Jul 6 15:54:11 BRT 2017


Rodrigo Souto started a new discussion on app/controllers/my_profile/cms_controller.rb:

> +        @article = Article.find(params[:parent_id])
> +        @articles = Article.where(parent_id: params[:parent_id])
> +      else
> +        profile = Profile.find_by(identifier: params[:profile])
> +        @articles = profile.articles.where(parent_id: nil)
> +      end
> +    else
> +      params_marked = params[:articles]
> +      if(!params[:parent_id].empty?)
> +        parent_id = params[:parent_id].to_i
> +      else
> +        parent_id = nil
> +      end
> +
> +      params[:articles].each do |id|
> +        article = Article.find(id)

Same as above about the scope.

---
Reply to this email directly or view it on GitLab: https://gitlab.com/noosfero/noosfero/merge_requests/1270#note_34373170
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20170706/5712754c/attachment-0001.html>


More information about the Noosfero-dev mailing list