Need an expert or real rails documentation. I’m a beginner on ruby on rails and this is my third project where I decide to use for and some if statements to display information (we are using devise gem)
----index.html.erb----- <% if user_signed_in? %> Text1 <% else > Text2 <% end>
I got the next review from another student: “View-related logic can be encapsulated in View helpers (app/helpers/*_helper.rb) There should be absolutely NO logic in views(ifs, loops…).” Hi’s justifying his review whit the next unreliable post whit no enough information: Where Do I Put My Code?
However, we tried looking for documentation about this and were not able to find something that fully justifies this change. We believe that it doesn’t represent proper optimization and it will make the loading time heavier because additional functions just to get a STRING. We also looked at the blog and it doesn’t fully explain the logic behind making this change. Could you please help by us issuing official documentation about rails that can explain this requirement in detail?