Conferences.incoming is defined on the model as scope:
scope :upcoming, (-> { where('end_date >= ?', Date.current) })
Conference.past
scope :past, (-> { where('end_date < ?', Date.current) })
It used to be a partial inside #index, but having their own page
yields some extra benefits:
- Performance: Move logic from the view to the controller
- Theres' no need to go extra steps inside the :index view
- UI: Remove the extra 'Upcoming Conferences' when the system needs
to start the flow of the creation of the first user
* master: (61 commits)
Replace more Commercials with Materials
Rename more commericals to materials
UI -- Repalce "Commerials" with "Materials".
Re-order Conference Associations
Cleanup CSS add Snap! style block attachments
hide venue link if there is no venue link
No dropshadow
Text with drop shadow for now
Tidy up the look of lodging panels
Show reg status for tickets.
Tweak CSS, fix loding order
Move the venue description to below the map.
Update lodging styling. Add description for venu when map is shown.
CSS tweaks...
Make the edit form not so wide.
Support markdown in more fields
Cleanup CSS ordering, fix coloring for navdropdowns
dumb...fix order of link_to args
ARRRGHHH, another typo...same line...
fix typo
...
The current codebase will end in a 500 APPLICATION ERROR if Conference#short_title isn't found... this should be a 404 NOT FOUND INSTEAD, which will be handled if we raise ActiveRecord::RecordNotFound.
Added missing image url as well as created twitter card.
validated both with twitter validator and facebook validator.
All passed.
Need to check to see if no image is selected, what is outcome.
The single query was producing a tremendously large ActiveRecord allocation.
While this isn't nearly as cool as one query, it's still a significant
reduction in SQL trips, and now has the bonus of only loading what is
actually going to be displayed.