Topic: deployment errors.
Okay I'm trying to deploy a site and I'm getting an error.
We're sorry, but something went wrong.
We've been notified about this issue and we'll take a look at it shortly.
the production log shows this
ActionView::TemplateError (Mysql::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'privileges ON roles.id = privileges.role_id WHERE ((privileges.user_id = 5) A' at line 1: SELECT roles.* FROM roles INNER JOIN privileges ON roles.id = privileges.role_id WHERE ((privileges.user_id = 5) AND (clan_id = 5)) ) on line #12 of app/views/events/view.rhtml:
10: <%= simple_format(h(@event.info)) %>
12: <%= can_do_change %>
14: <div id="event_content">
which relates to this code
role = Role.find_by_name("Matches")
if (@event.tipe != "GameNight") && ((@logged_user.masters.include?(@clan.master)) || (@logged_user.leaders.include?(@event.squad)) || (@logged_user.roles_for_clan(@clan).include? role))
render :partial => "match_status"
I'm sure its the role = Role.find_by_name("Matches") but unsure why. any insights into this?