@@ -43,7 +43,7 @@ class AgentsController < ApplicationController |
||
| 43 | 43 |
:can_control_other_agents => @agent.can_control_other_agents?, |
| 44 | 44 |
:options => @agent.default_options, |
| 45 | 45 |
:description_html => @agent.html_description, |
| 46 |
- :form => render_to_string(partial: 'oauth_dropdown') |
|
| 46 |
+ :form => render_to_string(partial: 'oauth_dropdown', locals: { agent: @agent })
|
|
| 47 | 47 |
} |
| 48 | 48 |
end |
| 49 | 49 |
|
@@ -31,7 +31,7 @@ |
||
| 31 | 31 |
</div> |
| 32 | 32 |
|
| 33 | 33 |
<div class='oauthable-form'> |
| 34 |
- <%= render partial: 'oauth_dropdown' %> |
|
| 34 |
+ <%= render partial: 'oauth_dropdown', locals: { agent: @agent } %>
|
|
| 35 | 35 |
</div> |
| 36 | 36 |
|
| 37 | 37 |
<div class="form-group"> |
@@ -1,6 +1,6 @@ |
||
| 1 |
-<% if @agent.try(:oauthable?) %> |
|
| 1 |
+<% if agent.try(:oauthable?) %> |
|
| 2 | 2 |
<div class="form-group type-select"> |
| 3 | 3 |
<%= label_tag :service %> |
| 4 |
- <%= select_tag 'agent[service_id]', options_for_select(@agent.valid_services_for(current_user).collect { |s| ["(#{s.provider}) #{s.name}", s.id]}, @agent.service_id), class: 'form-control' %>
|
|
| 4 |
+ <%= select_tag 'agent[service_id]', options_for_select(agent.valid_services_for(current_user).collect { |s| ["(#{s.provider}) #{s.name}", s.id]}, agent.service_id), class: 'form-control' %>
|
|
| 5 | 5 |
</div> |
| 6 | 6 |
<% end %> |