This file contains hidden or 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
<%= javascript_include_tag :defaults %> |
This file contains hidden or 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 type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/prototype/1.6.1/prototype.js"></script> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/scriptaculous/1.8.3/scriptaculous.js?load=effects,slider"></script> | |
<%= javascript_include_tag 'rails' %> |
This file contains hidden or 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
<meta name="csrf-param" content="authenticity_token"/> | |
<meta name="csrf-token" content="pACcWm38PxTmGUoz2bSmKIzIwpEmqCJDTH6xe2="/> |
This file contains hidden or 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
<%= link_to_remote "Vote Yes", :method=> :post, :update=>"widget#{widget.id}", :url => {:controller=>"widgets", :action => 'vote',:id=>widget,:vote=>true}, | |
:complete => visual_effect(:highlight, "widget#{widget.id}", :duration=>1.5, :startcolor=>"#3aed11"), :html => {:class=>"yes-btn"} %> |
This file contains hidden or 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
<%= link_to "Vote Yes", {:controller=>"widgets", :action => 'vote',:id=>widget, :vote=>true}, :remote=> true, :class=>"yes-button" %> |
This file contains hidden or 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
$("widget<%[email protected]%>").update("<%=@text%>"); | |
new Effect.Highlight("widget<%[email protected]%>", {duration: 1.5, startcolor: "<%=@start_color%>"}); |
This file contains hidden or 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
location /widgets/new_feature { | |
auth_basic "Restricted"; | |
auth_basic_user_file conf/htpasswd; | |
} |
This file contains hidden or 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
# Lock the whole app | |
ApplicationController < ActionController::Base | |
lock | |
end | |
# Lock specific controller/actions | |
ApplicationController < ActionController::Base | |
lock :actions=>["widgets#new","widgets#index"] | |
end |
This file contains hidden or 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
LOCK_PATH = File.dirname(__FILE__) + "/lock" | |
require "#{LOCK_PATH}/engine.rb" |
This file contains hidden or 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
require "lock" | |
require "rails" | |
module Lock | |
class Engine < Rails::Engine | |
end | |
end |