Maddy.Shik
Maddy.Shik

Reputation: 6787

Rails Model: Protected methods?

    class demo
        protected 
        def method1
        end

        def methods2
        end
    end

Will above syntax treat both of methods as protected or only first one?

Upvotes: 1

Views: 279

Answers (1)

Rob Di Marco
Rob Di Marco

Reputation: 44952

Both methods will be protected

Upvotes: 6

Related Questions