Permalink
Browse files

added flash messages

  • Loading branch information...
charly committed Oct 2, 2012
1 parent 879b8a0 commit dae476f42bc719aace08b7a11d146f5545e53914
@@ -27,6 +27,14 @@ body, div { margin: 0; padding:0;}
#header a {
color: #EEE;}
+.notice {
+ text-align: center;
+ background-color: #BCED91;
+ border: thin solid #629632;
+ color:; #629632;
+ padding: 18px;
+}
+
ul.jaillinks {
width: 400px;
list-style: none;
@@ -45,3 +53,4 @@ ul.jaillinks li a:hover {
+
@@ -13,13 +13,13 @@ def show
def install
@github = Github.find(params[:name], params[:repo])
@github.install
- redirect_to( root_path, :notice => "Installed!" )
+ redirect_to( "/jail/#{params[:name]}/#{params[:repo]}", :notice => "Installed!" )
end
def remove
@github = Github.find(params[:name], params[:repo])
@github.remove
- redirect_to( root_path, :notice => "Removed!" )
+ redirect_to( "/jail/#{params[:name]}/#{params[:repo]}", :notice => "Removed!" )
end
end
@@ -1,3 +1,9 @@
+<%- if flash[:notice] %>
+ <div class='notice'>
+ <%= flash[:notice] %>
+ </div>
+<% end %>
+
<h2>
<%=link_to "install", request.url + "/install" %>

0 comments on commit dae476f

Please sign in to comment.