Module: ProfileHelper
- Defined in:
- app/helpers/profile_helper.rb
Instance Method Summary collapse
- #optional_profile_section(section, options = {}) ⇒ Object
- #profile_section(section, profile_field_options = {}) ⇒ Object
-
#profile_sections_to_html(sections, options = {}) ⇒ Object
options: - force_show.
Instance Method Details
#optional_profile_section(section, options = {}) ⇒ Object
7 8 9 |
# File 'app/helpers/profile_helper.rb', line 7 def optional_profile_section(section, = {}) profile_section(section, ) if show_this_section?(section) end |
#profile_section(section, profile_field_options = {}) ⇒ Object
3 4 5 |
# File 'app/helpers/profile_helper.rb', line 3 def profile_section(section, = {}) render partial: 'profiles/section', locals: { section: section, profile_field_options: } end |
#profile_sections_to_html(sections, options = {}) ⇒ Object
options:
- force_show
14 15 16 17 18 19 |
# File 'app/helpers/profile_helper.rb', line 14 def profile_sections_to_html(sections, = {}) sections = sections_to_be_shown(sections) unless [:force_show] sections.collect do |section| profile_section(section) end.join.html_safe end |