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
$ git diff | |
diff --git a/init.rb b/init.rb | |
index f0a5316..29f7a2d 100644 | |
--- a/init.rb | |
+++ b/init.rb | |
@@ -73,6 +73,14 @@ Redmine::WikiFormatting::Macros.register do | |
:id => attach.id, | |
:filename => attach.filename | |
+ thumb_filename = "#{tw}_#{th}_#{attach.disk_filename}" |
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
# using Paginator with MongoMapper | |
# index action in a controller | |
def index | |
@pager = Paginator.new(User.count, 20) do |offset, per_page| | |
User.all(:offset => offset, :limit => per_page, :order => "created_at DESC") | |
end | |
@users = @pager.page(params[:page]) | |
respond_to do |format| | |
format.html # index.html.erb |
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
<p id="flash" class="<%= flash.keys.first.to_s %>"><%= flash.values.first %></p> |
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
# inside rails controller, to check http headers | |
request.headers.each do |k,v| | |
logger.debug "#{k} -> #{v}" | |
end |
NewerOlder