Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block maiha

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:39829
<%- require_css "active_scaffold/default/stylesheet" -%>
<div class="active-scaffold">
<table cellpadding="0" cellspacing="0">
<%- list_columns.each do |p| -%>
<th><%= column_header(p) %></th>
<%- end -%>
<th colspan="3">Actions</th>
View gist:39830
module Inspector
def self.root
File.join Merb.root, "inspector"
module HtmlInspectors
def self.lookup(object)
inspectors = {
DataMapper::Collection => DataMapperCollectionInspector,
View gist:40041
# app/controllers/top.rb
class Top < Application
def index
partial "/tmp/index"
merb : worker (port 4001) ~ undefined method `[]' for nil:NilClass - (NoMethodError)
/usr/lib/ruby/gems/1.8/gems/merb-core- `partial'
/data/home/maiha/merb/merbonrails-merb/app/controllers/top.rb:3:in `index'
View gist:41171
% merb -i
Loading init file from /data/home/maiha/merb/107/config/init.rb
Loading /data/home/maiha/merb/107/config/environments/development.rb
~ Connecting to database...
~ Loaded slice 'MerbAuthSlicePassword' ...
~ Parent pid: 13357
~ Compiling routes...
~ Activating slice 'MerbAuthSlicePassword' ...
~ Couldn't load Webrat, so some features, like `visit' will not be available. Please install webrat if you want these features.
/usr/lib/ruby/gems/1.8/gems/merb-core-1.0.7/lib/merb-core/test/test_ext/rspec.rb:48: uninitialized constant Webrat::Methods (NameError)
View gist:45655
mloc_language_code: ja
right: 右
left: 左
View gist:45657
0:<%= t :right %><br>
1:<%= t :right, :language=>"ja" %><br>
2:<%= translate :right, :language=>"ja" %><br>
these are all same results
View gist:45809
diff --git a/merb-core/lib/merb-core/rack/stream_wrapper.rb b/merb-core/lib/merb-core/rack/stream_wrapper.rb
index d11a141..ec6ce2c 100644
--- a/merb-core/lib/merb-core/rack/stream_wrapper.rb
+++ b/merb-core/lib/merb-core/rack/stream_wrapper.rb
@@ -14,8 +14,10 @@ module Merb
elsif @body.is_a?(String)
- else
+ elsif @body.respond_to?(:each)
View gist:46366
% merb -i
Loading init file from /data/apps/weborder_for_merb1/config/init.rb
Loading /data/apps/weborder_for_merb1/config/environments/development.rb ~ Connecting to database...
~ Loaded slice 'MerbAuthSlicePassword' ...
~ Parent pid: 18262 ~ (0.000902) SET backslash_quote = off
~ (0.000384) SET standard_conforming_strings = on
~ (0.012775) SELECT column_name FROM "information_schema"."key_column_usage" WHERE table_schema = curre
nt_schema() AND table_name = 'orders'
~ (0.014275) SELECT column_name, column_default, is_nullable, character_maximum_length, udt_name FROM "
information_schema"."columns" WHERE table_schema = current_schema() AND table_name = 'orders'
View init.rb to use cache in Merb1.0.8
dependency "merb-cache" do
Merb::Cache.setup do
View dm-ys
class Monster
include DataMapper::YunkerStar
url ""
thead "table.style_table thead tr"
tbody "table.style_table tbody tr"
irb(main):001:0> Monster.count
You can’t perform that action at this time.