1 if defined?(Merb::Plugins)
4 require 'dm-validations'
5 Merb::Plugins.add_rakefiles "merb_e_mart/merbtasks"
7 Merb::Slices::register(__FILE__)
8 Merb::Slices::config[:merb_e_mart] = { :layout => :merb_e_mart }
13 self.description = "MerbEMart is a chunky Merb slice!"
14 self.version = "0.0.1"
15 self.author = "YOUR NAME"
17 # Initialization hook - runs before AfterAppLoads BootLoader
21 # Activation hook - runs after AfterAppLoads BootLoader
25 # Deactivation hook - triggered by Merb::Slices#deactivate
29 # Setup routes inside the host application
31 # @param scope<Merb::Router::Behaviour>
32 # Routes will be added within this scope (namespace). In fact, any
33 # router behaviour is a valid namespace, so you can attach
34 # routes at any level of your router setup.
35 def self.setup_router(scope)
40 # Setup the slice layout for MerbEMart
42 # Use MerbEMart.push_path and MerbEMart.push_app_path
43 # to set paths to merb_e_mart-level and app-level paths. Example:
45 # MerbEMart.push_path(:application, MerbEMart.root)
46 # MerbEMart.push_app_path(:application, Merb.root / 'slices' / 'merb_e_mart')
49 # Any component path that hasn't been set will default to MerbEMart.root
51 # Or just call setup_default_structure! to setup a basic Merb MVC structure.
52 MerbEMart.setup_default_structure!