mirror of
https://github.com/fluent/fluentd-ui.git
synced 2026-05-05 02:46:11 +02:00
Clean up routes
This commit is contained in:
parent
20997db412
commit
c4ccb9488c
@ -1,6 +1,6 @@
|
||||
class MiscsController < ApplicationController
|
||||
class MiscController < ApplicationController
|
||||
def show
|
||||
redirect_to information_misc_path
|
||||
redirect_to misc_information_path
|
||||
end
|
||||
|
||||
def information
|
||||
@ -12,7 +12,7 @@ class UsersController < ApplicationController
|
||||
unless @user.update_attributes(user_params)
|
||||
return render :show
|
||||
end
|
||||
redirect_to misc_user_path
|
||||
redirect_to user_path
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
@ -21,10 +21,10 @@
|
||||
<%= link_to_other icon('fa-coffee fa-fw') << " " << t('terms.misc') << icon('fa pull-right fa-caret-down'), misc_path %>
|
||||
<ul class="nav nav-second-level">
|
||||
<li>
|
||||
<%= link_to_other t("miscs.information.page_title"), information_misc_path %>
|
||||
<%= link_to_other t("misc.information.page_title"), misc_information_path %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to_other t('users.show.page_title'), misc_user_path %>
|
||||
<%= link_to_other t('users.show.page_title'), user_path %>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- /.nav-second-level -->
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
- @user.errors.full_messages.each do |e|
|
||||
%div.alert.alert-danger= e
|
||||
|
||||
= form_for(:user, url: misc_user_path, method: :patch) do |f|
|
||||
= form_for(:user, url: user_path, method: :patch) do |f|
|
||||
%div.form-group
|
||||
= f.label :name
|
||||
= f.text_field :name, class: "form-control", disabled: true
|
||||
|
||||
@ -45,7 +45,7 @@ ja:
|
||||
<<: *terms
|
||||
page_title: ユーザー管理
|
||||
|
||||
miscs:
|
||||
misc:
|
||||
common: &misc_common
|
||||
<<: *terms
|
||||
information:
|
||||
|
||||
@ -25,8 +25,7 @@ Rails.application.routes.draw do
|
||||
end
|
||||
end
|
||||
|
||||
resource :misc, only: :show do
|
||||
get "information"
|
||||
resource :user, only: [:show, :edit, :update]
|
||||
end
|
||||
get "misc" => "misc#show"
|
||||
get "misc/information"
|
||||
resource :user, only: [:show, :edit, :update]
|
||||
end
|
||||
|
||||
@ -1,5 +0,0 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe MiscsController do
|
||||
|
||||
end
|
||||
@ -2,7 +2,7 @@ describe "users" do
|
||||
let(:exists_user) { FactoryGirl.create(:user) }
|
||||
|
||||
describe "edit" do
|
||||
let(:url) { misc_user_path }
|
||||
let(:url) { user_path }
|
||||
it_should_behave_like "login required"
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user