Last active
December 21, 2015 08:18
-
-
Save johnnymo87/6277078 to your computer and use it in GitHub Desktop.
I must have something wrong either with my erb or my route, because I'm getting this crazy suffix on my URI when I press my Merge button. From what I can tell, this suffix is an array with the date the article was created and it's permalink, and I have no idea how it got it there instead of the id.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# in /admin/content | |
# code excluded | |
<h3><%= _("Merge Articles")%></h3> | |
<%= form_tag merge_articles_path(@article) do %> | |
<%= text_field_tag :sender_id, nil, :placeholder => 'Article ID' %> | |
<%= submit_tag 'Merge' %> | |
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# code excluded | |
# Admin/XController | |
%w{advanced cache categories comments content profiles feedback general pages | |
resources sidebar textfilters themes trackbacks users settings tags redirects seo post_types }.each do |i| | |
match "/admin/#{i}", :to => "admin/#{i}#index", :format => false | |
match "/admin/#{i}(/:action(/:id))", :to => "admin/#{i}", :action => nil, :id => nil, :format => false | |
end | |
# My route | |
match '/admin/content/merge_articles/:id', to: 'admin/content#merge_articles', as: 'merge_articles' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/admin/content/merge_articles/[2013, "08", "18", "merge-into-me"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment