Sha256: 6f67b153294fdb00bd0b17f55955b84a0c5829e19f65813860f03fbbd0c05b95

Contents?: true

Size: 1.03 KB

Versions: 2

Compression:

Stored size: 1.03 KB

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
ITEMTYPES = [:index, :html, :breadcrumb, :geo]
app.routes.draw do

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

  # HTML Meta Tags
  get "/html" => "snipp#html", as: :html

  # for Breadcumb
  get "/foods"                     => "snipp#breadcrumb", as: :foods
  get "/foods/fruits"              => "snipp#breadcrumb", as: :fruits
  get "/foods/fruits/:color"       => "snipp#breadcrumb", as: :fruits_color
  get "/foods/fruits/:color/:name" => "snipp#breadcrumb", as: :food
end

# controllers
class ApplicationController < ActionController::Base ; end

class SnippController < ApplicationController

  ITEMTYPES.each do |e|
    define_method e do
    end
  end

end


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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
snipp-0.1.1 spec/fake_rails.rb
snipp-0.1.0 spec/fake_rails.rb