Skip to content

Commit 6933f5d

Browse files
committedMay 16, 2015
added fixed position for footer
1 parent 06ab7d0 commit 6933f5d

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed
 

‎app/controllers/comment.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
@the_post = Post.find_by(id: params[:id])
1818
@the_comment = @the_post.comments.find_by(id: params[:commentid])
1919
if @the_comment.user_id == session[:user_id]
20-
erb :"comment/edit"
20+
return erb :"comment/edit"
2121

2222
else
2323
"Sorry, you can only edit your own comments!"

‎public/css/application.css

+2
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,8 @@ a:link, a:visited{
205205
/* position:absolute;*/
206206
bottom:0;
207207
left:0;
208+
position: fixed;
209+
bottom: 0;
208210
}
209211

210212
#comments_section {

‎public/js/application.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,14 @@ $('#commentlink').on('click', function(event){
5959
//ajax get for edit comment
6060

6161
// $('#firsteditcomm').on('submit', function(event){
62-
// console.log(event)
6362
// event.preventDefault();
63+
// console.log(this.href);
6464
// $.ajax({
6565
// type: "GET",
66-
// url: this.href,
66+
// // url: '/posts//comments//edit',
67+
// url: this.href;
6768
// }).done(function(response){
68-
// console.log(response);
69+
// console.log("the response is" + response);
6970
// $('#comments_section').replaceWith(response)
7071
// });
7172
// });

0 commit comments

Comments
 (0)
Please sign in to comment.