Module: Taggable::EventsController
- Defined in:
- lib/taggable/events_controller.rb
Class Method Summary collapse
Instance Method Summary collapse
- #calendar_parameter_names_with_tags ⇒ Object
- #continuing_events_with_tags ⇒ Object
- #event_finder_with_tags ⇒ Object
- #tags ⇒ Object
- #url_with_tag(tag) ⇒ Object
- #url_without_tag(tag) ⇒ Object
Class Method Details
.included(base) ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'lib/taggable/events_controller.rb', line 4 def self.included(base) base.class_eval { helper_method :tags, :url_with_tag, :url_without_tag alias_method_chain :event_finder, :tags alias_method_chain :continuing_events, :tags alias_method_chain :calendar_parameter_names, :tags } end |
Instance Method Details
#calendar_parameter_names_with_tags ⇒ Object
29 30 31 |
# File 'lib/taggable/events_controller.rb', line 29 def + [:tags] end |
#continuing_events_with_tags ⇒ Object
23 24 25 26 27 |
# File 'lib/taggable/events_controller.rb', line 23 def @continuing_events = @continuing_events.() if .any? @continuing_events end |
#event_finder_with_tags ⇒ Object
17 18 19 20 21 |
# File 'lib/taggable/events_controller.rb', line 17 def ef = ef = ef.() if .any? ef end |
#tags ⇒ Object
13 14 15 |
# File 'lib/taggable/events_controller.rb', line 13 def ||= Tag.from_list(params[:tags], false) || [] end |
#url_with_tag(tag) ⇒ Object
39 40 41 42 43 |
# File 'lib/taggable/events_controller.rb', line 39 def url_with_tag(tag) url_for(url_parts({ :tags => Tag.to_list( + [tag]) })) end |
#url_without_tag(tag) ⇒ Object
33 34 35 36 37 |
# File 'lib/taggable/events_controller.rb', line 33 def url_without_tag(tag) url_for(url_parts({ :tags => Tag.to_list( - [tag]) })) end |