Skip to content

Commit

Permalink
Merge branch 'hotfix/0.2.22_fix'
Browse files Browse the repository at this point in the history
* hotfix/0.2.22_fix:
  fix image url on main page
  • Loading branch information
kalashnikovisme committed Jul 3, 2015
2 parents e2773c9 + fac4946 commit 8e00d89
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/api/events_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ class Api::EventsController < Api::ApplicationController
def index
events = EventDecorator.decorate Event.confirmed.near_future.drop(params[:offset].to_i).first(params[:count].to_i)
hash = []
events.each { |event| event = event.decorate; hash << { id: event.id, photo: event.main_photo.event_main_page_version, title: event.title, text: event.lead, date: event.full_date_duration, category: event.activity_line.title } }
events.each { |event| event = event.decorate; hash << { id: event.id, photo: event.main_photo.event_main_page_version.url, title: event.title, text: event.lead, date: event.full_date_duration, category: event.activity_line.title } }
last_events = true if events.count < 8
render json: { events: hash, last_events: last_events }
end
Expand Down

0 comments on commit 8e00d89

Please sign in to comment.