noosfero | WIP: Rails 5.1.6 Upgrade (!1438)

Gabriel Silva gitlab at mg.gitlab.com
Tue May 29 22:11:43 BRT 2018


Gabriel Silva commented on a discussion on app/models/block.rb:

>  
>    delegate :environment, :to => :box, :allow_nil => true
>  
> -  acts_as_list scope: -> block { where box_id: block.box_id }
> +  acts_as_list scope: :box
>  
> -  belongs_to :box
> -  belongs_to :mirror_block, :class_name => "Block"
> -  has_many :observers, :class_name => "Block", :foreign_key => "mirror_block_id"
> +  belongs_to :box, optional: true

ok, it's probably better if we follow the conventions. Just make sure to remove the `required: true` where the relation is not optional.

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/noosfero/noosfero/merge_requests/1438#note_75697786
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/20180530/36dfe8fe/attachment-0001.html>


More information about the Noosfero-dev mailing list