I'm very green to ruby on railsruby on rails and have been working on getting an application working with mysql, everything works except for one particular page when loading assets from mysqlmysql database.
I'm not sure what is going on and have not had luck fixing it.
I'm running on ubuntuubuntu, with passenger 4.0.20passenger 4.0.20, mysql 2.9.1 gemmysql 2.9.1 gem, rails 3.0.7rails 3.0.7,
when viewing the page either under the passenger daemon or through strictly apache the app returns this:
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 '== 'assets')' at line 1: SELECT typesMysql::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 '== 'assets')' at line 1: SELECT .* FROM typestypes.* FROM WHERE (type_for == 'assets')types WHERE (type_for == 'assets')
Extracted source (around line #52):
49:
50:
51: <%= f.label :asset_type_id %>
52: <%= f.select :asset_type_id, Type.where("type_for == 'assets'").collect{|u| [ u.name, u.id ]} , { :include_blank => true }, {} %>
53:
54:
55: <%= f.label :asset_status_id %>
app/views/assets/_form.html.erb:52:in block in _app_views_assets__form_html_erb___1678548858904611904_30514700_2370109183913626002' app/views/assets/_form.html.erb:1:in _app_views_assets__form_html_erb___1678548858904611904_30514700_2370109183913626002'
app/views/assets/new.html.erb:3:in `_app_views_assets_new_html_erb___211939086717483877_30551560__3850816556217762359'
49: </div>
50: <div class="field">
51: <%= f.label :asset_type_id %><br />
52: <%= f.select :asset_type_id, Type.where("type_for == 'assets'").collect{|u| [ u.name, u.id ]} , { :include_blank => true }, {} %>
53: </div>
54: <div class="field">
55: <%= f.label :asset_status_id %><br />
app/views/assets/_form.html.erb:52:in `block in_app_views_assets__form_html_erb___1678548858904611904_30514700_2370109183913626002'
app/views/assets/_form.html.erb:1:in `_app_views_assets__form_html_erb___1678548858904611904_30514700_2370109183913626002'
app/views/assets/new.html.erb:3:in `_app_views_assets_new_html_erb___211939086717483877_30551560__3850816556217762359'
I'm at my end of possible things to try, not really sure where to go with this. Any help would be amazing right now.