jordanisip (owner)

Revisions

gist: 135505 Download_button fork
public
Public Clone URL: git://gist.github.com/135505.git
Text only
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
===VIEW===
 
      <%- form_for @credential, user_external_credentials_path(@user), :class => "horizontal" do -%>
        <div class="input-wrapper">
          <%= f.label :login, "Twitter Username" -%>
          <%= f.text_field :login, :class => 'text' -%>
        </div>
 
        <div class="input-wrapper">
          <%= f.label :password, "Twitter Password" -%>
          <%= f.password_field :password, :class => 'text' -%>
        </div>
    
        <div class="btn-wrapper">
          <%= f.submit "Save", :class => "button" %>
        </div>
      <%- end -%>
    <%- end -%>
 
=== CONTROLLER ===
 
  def sharing
    @credential = @user.external_credentials.new
  end
 
=== ERROR ===
 
ActionView::TemplateError (undefined method `external_credentials_path' for #<ActionView::Base:0x102f76e0>) on line #8 of app/views/users/sharing.html.erb:
5: <%- if @user.twitter_credential.present? -%>
6: Your Twitter credentials have been stored for username <strong><%= @user.twitter_credential.login %></strong>.
7: <%- else -%>
8: <%- form_for @credential, user_external_credentials_path(@user) do -%>
9: <div class="input-wrapper">
10: <%= f.label :login, "Twitter Username" -%>
11: <%= f.text_field :login, :class => 'text' -%>
 
    vendor/rails/actionpack/lib/action_controller/polymorphic_routes.rb:109:in `__send__'
    vendor/rails/actionpack/lib/action_controller/polymorphic_routes.rb:109:in `polymorphic_url'
    vendor/rails/actionpack/lib/action_controller/polymorphic_routes.rb:116:in `polymorphic_path'
    vendor/rails/actionpack/lib/action_view/helpers/form_helper.rb:298:in `apply_form_for_options!'
    vendor/rails/actionpack/lib/action_view/helpers/form_helper.rb:277:in `form_for_without_haml'
    vendor/gems/haml-edge-2.1.13/rails/./lib/haml/helpers/action_view_mods.rb:171:in `form_for'
    app/views/users/sharing.html.erb:8