This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| after_validation :set_g_comment | |
| # | |
| protected | |
| # | |
| def set_g_comment | |
| if self.gender == "female" | |
| self.comment=self.comment.gsub("HESHE","she".capitalize) | |
| else | |
| self.comment=self.comment.gsub("HESHE","he".capitalize) | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <%= simple_form_for(report) do |f| %> | |
| <%= f.input :first_day_id, collection: Week.all, as: :grouped_select, group_method: :days %> | |
| <%= f.input :last_day_id, collection: Week.all, as: :grouped_select, group_method: :days %> | |
| <%= f.button :submit, class: "btn-primary" %> | |
| <% end %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Started GET "/reports/new" for ::1 at 2016-09-20 10:29:29 -0400 | |
| Processing by ReportsController#new as HTML | |
| Subject Load (0.2ms) SELECT "subjects".* FROM "subjects" | |
| CACHE (0.0ms) SELECT "subjects".* FROM "subjects" | |
| Intro Load (0.1ms) SELECT "intros".* FROM "intros" WHERE "intros"."subject_id" = ? [["subject_id", 1]] | |
| Intro Load (0.1ms) SELECT "intros".* FROM "intros" WHERE "intros"."subject_id" = ? [["subject_id", 2]] | |
| CACHE (0.0ms) SELECT "subjects".* FROM "subjects" | |
| Unit Load (0.2ms) SELECT "units".* FROM "units" WHERE "units"."subject_id" = ? [["subject_id", 1]] | |
| Unit Load (0.1ms) SELECT "units".* FROM "units" WHERE "units"."subject_id" = ? [["subject_id", 2]] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <%= simple_form_for(report) do |f| %> | |
| <%= f.association :subject %> | |
| <%= f.input :intro_id, collection: Subject.all, as: :grouped_select, group_method: :intros %> | |
| <%= f.input :unit_id, collection: Subject.all, as: :grouped_select, group_method: :units %> | |
| <%= f.button :submit, class: "btn-primary" %> | |
| <% end %> |