This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
$(function() { | |
$( "#dialog-modal" ).dialog({ | |
height: 140, | |
modal: true, | |
autoOpen: false, | |
draggable: false, | |
resizable: false, | |
position: { my: "left top", at: "left bottom", of: button } | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function() { | |
$("#birds").autocomplete({ | |
source: "search.php", | |
minLength: 2, | |
select: function( event, ui ) { | |
alert(ui.item.value); | |
} | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*Linear-gradient*/ | |
@include linear-gradient(#1e5799, #2989d8); | |
/*Radial-gradient*/ | |
@include radial-gradient(#1e5799, #3dc3d1); | |
/*Tint & Shade*/ | |
background: tint(red, 40%); | |
background: shade(blue, 60%); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def flash_message(name,msg) | |
if name == :notice | |
box_class = "success" | |
name = "Success" | |
else | |
box_class = "error" | |
name = "Error" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def is_active?(page_name) | |
"active" if params[:controller] == page_name | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PagesController < ApplicationController | |
def index | |
@pages = Page.all | |
end | |
def show | |
@page = Page.find(params[:id]) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rails new blog -m https://raw.github.com/andreaseriksson/apptemplate/master/app_template.rb |
NewerOlder