Skip to content

Instantly share code, notes, and snippets.

View TheNicholasNick's full-sized avatar

Nicholas Nick TheNicholasNick

View GitHub Profile
[13:50] <botanicus> I'm trying to change Merb layout to acts like django which means there are just apps and in the apps are controllers/*.rb etc, but one site can has many apps.
[13:50] <botanicus> App for blog, for forum etc. I know we have slices, but this is so much transparent that I'd like to implement it. I'm not sure how should I do it exactly. More processes of Merb in each apps or change API to handle more many dirs where the stuff can be?
Merb.logger.info("Loaded DEVELOPMENT Environment...")
Merb::Config.use { |c|
c[:exception_details] = true
c[:reload_templates] = true
c[:reload_classes] = true
c[:reload_time] = 0.5
c[:ignore_tampered_cookies] = true
c[:log_auto_flush ] = true
c[:log_level] = :debug
irb(main):002:0* Merb::Authentication.default_strategy_order
=> [Merb::Authentication::Strategies::Basic::Base, AuthenticateOnCompany, Merb::Authentication::Strategies::Basic::Form]
irb(main):003:0> Merb::Slices::config[:"merb-auth-slice-password"][:no_default_strategies]
=> true
merb : worker (port 4000) ~ Executed all before worker shutdown callbacks...
~ Compiling routes...
~ Activating slice 'MerbAuthSlicePassword' ...
merb : worker (port 4000) ~ Starting Mongrel at port 4000
merb : worker (port 4000) ~ Successfully bound to port 4000
merb : worker (port 4000) ~ Executed all before worker shutdown callbacks...
~ Compiling routes...
class Company
include DataMapper::Resource
property :id , Serial
property :sub_domain , String , :nullable => false, :length => 2..10 , :unique_index => true
property :name , String , :nullable => false, :length => 100
property :branding_code, String , :nullable => false, :length => 2..10 , :unique_index => true
property :active , Boolean , :nullable => false, :default => true
property :created_at , DateTime
property :updated_at , DateTime
@TheNicholasNick
TheNicholasNick / Install Thor
Created November 4, 2008 23:26
My way of starting a new merb project
norr@znd03 ~ $ gem list
*** LOCAL GEMS ***
norr@znd03 ~ $ gem install thor
Successfully installed thor-0.9.8
1 gem installed
Installing ri documentation for thor-0.9.8...
Installing RDoc documentation for thor-0.9.8...