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
| class User | |
| # By including Mack::Distributable this class will now | |
| # be registered with Rinda for other Mack applications | |
| # to use. | |
| include Mack::Distributable | |
| def self.all | |
| # code here... | |
| 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
| Mack::Routes.build do |r| | |
| r.login "/users/login", :controller => :users, :action => :login | |
| r.do_login "/users/login", :controller => :users, :action => :do_login, :method => :post | |
| r.resource :users # Added by rake generate:scaffold name=user | |
| r.with_options(:controller => :pages) do |map| | |
| map.newest_pages "/pages/newest_pages/:limit", :action => :newest_pages | |
| map.recently_updated_pages "/pages/recently_updated_pages/:limit", :action => :recently_updated_pages |
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
| ## Sample load ## | |
| # Passenger (Mod_Rails) | |
| LoadModule passenger_module /opt/local/lib/ruby/gems/1.8/gems/passenger-2.0.3/ext/apache2/mod_passenger.so | |
| PassengerRoot /opt/local/lib/ruby/gems/1.8/gems/passenger-2.0.3 | |
| PassengerRuby /opt/local/bin/ruby |
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
| ## Sample virtual host ## | |
| <VirtualHost *:80> | |
| ServerName www.example.com | |
| DocumentRoot "/path/to/your/mack/app/public" | |
| </VirtualHost> |
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
| configatron do |config| | |
| config.email = "mark@mackframework.com" | |
| config.database_url = "postgres://localhost/mack_framework_rocks" | |
| # etc... | |
| 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
| configatron.email # => "mark@mackframework.com" | |
| configatron.database_url # => "postgres://localhost/mack_framework_rocks" |
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
| configatron do |config| | |
| config.database_url = "postgres://localhost/mack_framework_rocks_development" | |
| 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
| configatron.email # => "mark@mackframework.com" | |
| configatron.database_url # => "postgres://localhost/mack_framework_rocks_development" |
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
| configatron do |config| | |
| config.website_url = "http://www.mackframework.com" | |
| config.namespace(:email) do |email| | |
| email.namespace(:pop) do |pop| | |
| pop.address = "pop.example.com" | |
| pop.port = "110" | |
| # etc ... | |
| end | |
| email.namespace(:smtp) do |smtp| | |
| smtp.address = "smtp.example.com" |
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
| configatron.email.pop.address # => "pop.example.com" | |
| configatron.email.smtp.address # => "smtp.example.com" | |
| configatron.website_url # => "http://www.mackframework.com" |