diff --git a/Gemfile b/Gemfile index 351f858..cddc99c 100644 --- a/Gemfile +++ b/Gemfile @@ -61,11 +61,7 @@ gem "rolify" gem "cancan" # Fileupload -<<<<<<< HEAD + gem 'paperclip' ,'~>3.4.0' -# Git gem 'git' -======= -gem 'paperclip' ,'~>3.4.0' ->>>>>>> parent of 1085698... add GIT gem diff --git a/app/controllers/config_controller.rb b/app/controllers/config_controller.rb index cb15265..309dc9d 100644 --- a/app/controllers/config_controller.rb +++ b/app/controllers/config_controller.rb @@ -4,7 +4,8 @@ class ConfigController < ApplicationController end def get_git_update g = Git.open(".") - flash[:notice] =g.remote("github").fetch - redirect_to url_for(:action => 'index', :controller => 'config') + flash[:notice] =g.status +# flash[:notice] =g.remote("github").fetch + redirect_to config_url end end \ No newline at end of file diff --git a/app/views/config/index.html.erb b/app/views/config/index.html.erb index b74b03c..d33b6b6 100644 --- a/app/views/config/index.html.erb +++ b/app/views/config/index.html.erb @@ -4,7 +4,7 @@ <%= link_to ''.html_safe + 'Userverwaltung',:controller =>"users",:action => "index" %> -<%= link_to 'Update',:controller =>"config",:action => "get_git_update" %> +<%= link_to 'Update',config_getgitupdate_url %> diff --git a/app/views/home/index.html.erb b/app/views/home/index.html.erb index 3168477..a7804fc 100644 --- a/app/views/home/index.html.erb +++ b/app/views/home/index.html.erb @@ -1,3 +1,2 @@
<%= t :hello %>
<%= t 'home.hallobeiderfet' %>
-Test für GIT 1
\ No newline at end of file diff --git a/app/views/layouts/menu.html.erb b/app/views/layouts/menu.html.erb index 49d5077..91e87f8 100644 --- a/app/views/layouts/menu.html.erb +++ b/app/views/layouts/menu.html.erb @@ -22,4 +22,5 @@ <% elsif I18n.locale == :de %> <%= link_to "English" ,switch_locale_url(:en)%> <%end %> -<%= link_to 'Admin',:controller =>"config",:action => "index" %> +<%= link_to 'Admin' , config_url +%> diff --git a/config/routes.rb b/config/routes.rb index 16b17f5..154ec9f 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -5,16 +5,16 @@ Fetsite::Application.routes.draw do resources :beispiele -devise_for :users + scope '(:locale)/admin' do resources :users -get 'config',:controller=>:config,:action=>:index -#get 'config/get_git_update',:controller=>:config,:action=>:get_git_update +get 'config',:controller=>:config,:action=>:index , :as => 'config' +get 'config/get_git_update',:controller=>:config,:action=>:get_git_update, :as=>'config_getgitupdate' end - +devise_for :users scope '(:locale)' do