diff --git a/Gemfile b/Gemfile index d30f98f..351f858 100644 --- a/Gemfile +++ b/Gemfile @@ -61,7 +61,11 @@ gem "rolify" gem "cancan" # Fileupload +<<<<<<< HEAD gem 'paperclip' ,'~>3.4.0' # Git -gem 'git' \ No newline at end of file +gem 'git' +======= +gem 'paperclip' ,'~>3.4.0' +>>>>>>> parent of 1085698... add GIT gem diff --git a/Gemfile.lock b/Gemfile.lock index 04de5e8..6b0832a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -56,6 +56,7 @@ GEM formtastic-bootstrap (2.0.0) formtastic (~> 2.2) formtastic-bootstrap + git (1.2.5) globalize3 (0.3.0) activemodel (>= 3.0.0) activerecord (>= 3.0.0) @@ -153,6 +154,7 @@ DEPENDENCIES execjs (~> 1.4.0) formtastic (~> 2.2.1) formtastic-bootstrap + git globalize3 (~> 0.3.0) jquery-rails paper_trail (>= 2.7.0) diff --git a/app/controllers/config_controller.rb b/app/controllers/config_controller.rb index 9edaab2..cb15265 100644 --- a/app/controllers/config_controller.rb +++ b/app/controllers/config_controller.rb @@ -2,5 +2,9 @@ class ConfigController < ApplicationController def index end - + def get_git_update + g = Git.open(".") + flash[:notice] =g.remote("github").fetch + redirect_to url_for(:action => 'index', :controller => 'config') + 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 576558a..b74b03c 100644 --- a/app/views/config/index.html.erb +++ b/app/views/config/index.html.erb @@ -4,4 +4,8 @@ <%= link_to ''.html_safe + 'Userverwaltung',:controller =>"users",:action => "index" %> +<%= link_to 'Update',:controller =>"config",:action => "get_git_update" %> + + + diff --git a/config/routes.rb b/config/routes.rb index c5b1a20..16b17f5 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -5,10 +5,13 @@ Fetsite::Application.routes.draw do resources :beispiele - devise_for :users +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 + + end