noosfero | Move contents (!1270)

Rodrigo Souto gitlab at mg.gitlab.com
Thu Jul 6 15:53:30 BRT 2017


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

>      render :action => 'edit'
>    end
>  
> +  def move
> +    if request.get?
> +      if params[:parent_id]
> +        @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?)

`!params[:parent_id].empty?` == `params[:parent_id].present?`

---
Reply to this email directly or view it on GitLab: https://gitlab.com/noosfero/noosfero/merge_requests/1270#note_34373137
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/9fcd0c40/attachment-0001.html>


More information about the Noosfero-dev mailing list