Sha256: ee4d98db41e6e46a0c654e40d35e6c63f6ed19e06bdace1356b8cd35de2ff0f9

Contents?: true

Size: 949 Bytes

Versions: 2

Compression:

Stored size: 949 Bytes

Contents

require 'action_controller/railtie'
require 'action_view/railtie'

# config
app = Class.new Rails::Application
app.config.active_support.deprecation = :log
app.config.secret_token = "e65e0140352e39703c113b0ce30335e8"
app.config.generators do |g|
#  g.template_engine :haml
end
app.initialize!

# routing
SNIPP_TYPES = [:breadcumb]
app.routes.draw do
  get "/" =>"snipp#index" ,as: :root

  SNIPP_TYPES.each do |e|
    get "/e" => "index##{e}" ,as: e
  end

  # for Breadcumb
  get "/food"                 => "snipp#index", as: :food
  get "/food/fruit"           => "snipp#index", as: :food_fruit
  get "/food/fruit/red"       => "snipp#index", as: :food_fruit_red
  get "/food/fruit/red/apple" => "snipp#index", as: :food_fruit_red_apple
end

# controllers
class ApplicationController < ActionController::Base ; end

class SnippController < ApplicationController

  def index ; end

end


# helpers
Object.const_set(:ApplicationHelper, Module.new)

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
snipp-0.0.2 spec/fake_rails.rb
snipp-0.0.1 spec/fake_rails.rb