Commit 984614a9a9a6f486cd8291339d41c1948610fadb

added slug to page
  
66 end
77
88 def show
9 @page = Page.find(params[:id])
9 @page = Page.find_by_slug_or_id(params[:id])
1010 end
1111
1212 def new
1414 end
1515
1616 def edit
17 @page = Page.find(params[:id])
17 @page = Page.find_by_slug_or_id(params[:id])
1818 end
1919
2020 def create
2929 end
3030
3131 def update
32 @page = Page.find(params[:id])
32 @page = Page.find_by_slug_or_id(params[:id])
3333
3434 if @page.update_attributes(params[:page])
3535 flash[:success] = 'Update successfully!'
4040 end
4141
4242 def destroy
43 @page = Page.find(params[:id])
43 @page = Page.find_by_slug_or_id(params[:id])
4444
4545 if @page.destroy
4646 flash[:success] = 'Page deleted successfully!'
  
99# published_at :datetime
1010# created_at :datetime
1111# updated_at :datetime
12# slug :string(255)
1213#
1314
1415class Page < ActiveRecord::Base
1516 has_many :comments, :as => :commentable
1617
1718 validates_presence_of :title, :body
19
20 def self.find_by_slug_or_id(arg)
21 if arg.to_i == 0
22 find_by_slug(arg)
23 else
24 find_by_id(arg.to_i)
25 end
26 end
27
28 def to_param
29 slug.present? ? slug : id
30 end
1831end
  
1010# category_id :integer
1111# created_at :datetime
1212# updated_at :datetime
13# user_id :integer
13# user_id :integer not null
1414#
1515
1616class Post < ActiveRecord::Base
  
1class AddSlugToPage < ActiveRecord::Migration
2 def self.up
3 add_column :pages, :slug, :string
4 end
5
6 def self.down
7 remove_column :pages, :slug
8 end
9end
  
99#
1010# It's strongly recommended to check this file into your version control system.
1111
12ActiveRecord::Schema.define(:version => 20081016223035) do
12ActiveRecord::Schema.define(:version => 20090409114716) do
1313
1414 create_table "categories", :force => true do |t|
1515 t.string "name", :null => false
4949 t.datetime "published_at"
5050 t.datetime "created_at"
5151 t.datetime "updated_at"
52 t.string "slug"
5253 end
5354
5455 create_table "posts", :force => true do |t|
6060 t.integer "category_id"
6161 t.datetime "created_at"
6262 t.datetime "updated_at"
63 t.integer "user_id"
63 t.integer "user_id", :null => false
6464 end
6565
6666 create_table "settings", :force => true do |t|
  
1/*
2Sass::SyntaxError: Syntax error in '!!last' at character 5.
3on line 214 of /home/aa/apps/bl6g/public/stylesheets/sass/base.sass
4
5210: //
6211: =column(!n = max, !last = false)
7212: float: left
8213: @if !n != max
9214: @if !!last
10215: margin-right: 10px
11216: width = !n - 10px
12217: @if !last
13218: margin-right: 0px
14219: width = !n
15220: @if !n == max
16
17
18Backtrace:
19/home/aa/apps/bl6g/public/stylesheets/sass/base.sass:214
20/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/script/lexer.rb:61:in `token'
21/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/script/lexer.rb:67:in `peek'
22/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/script/parser.rb:137:in `try_tok'
23(eval):2:in `unary_minus'
24(eval):2:in `times_div_or_mod'
25(eval):2:in `plus_or_minus'
26(eval):2:in `relational'
27(eval):2:in `eq_or_neq'
28(eval):2:in `and_expr'
29(eval):2:in `or_expr'
30/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/script/parser.rb:57:in `concat'
31(eval):2:in `expr'
32/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/script/parser.rb:127:in `send'
33/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/script/parser.rb:127:in `assert_expr'
34/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/script/parser.rb:18:in `parse'
35/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/script/parser.rb:24:in `parse'
36/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/script.rb:26:in `parse'
37/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/engine.rb:431:in `parse_script'
38/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/engine.rb:338:in `parse_directive'
39/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/engine.rb:260:in `parse_line'
40/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/engine.rb:180:in `build_tree'
41/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/engine.rb:200:in `append_children'
42/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/engine.rb:199:in `each'
43/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/engine.rb:199:in `append_children'
44/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/engine.rb:190:in `build_tree'
45/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/engine.rb:200:in `append_children'
46/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/engine.rb:199:in `each'
47/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/engine.rb:199:in `append_children'
48/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/engine.rb:190:in `build_tree'
49/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/engine.rb:200:in `append_children'
50/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/engine.rb:199:in `each'
51/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/engine.rb:199:in `append_children'
52/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/engine.rb:124:in `render_to_tree'
53/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/engine.rb:459:in `import'
54/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/engine.rb:441:in `map'
55/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/engine.rb:441:in `import'
56/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/engine.rb:328:in `parse_directive'
57/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/engine.rb:260:in `parse_line'
58/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/engine.rb:180:in `build_tree'
59/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/engine.rb:200:in `append_children'
60/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/engine.rb:199:in `each'
61/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/engine.rb:199:in `append_children'
62/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/engine.rb:124:in `render_to_tree'
63/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/engine.rb:104:in `render'
64/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/plugin.rb:75:in `update_stylesheet'
65/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/plugin.rb:60:in `update_stylesheets'
66/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/plugin.rb:55:in `each'
67/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/plugin.rb:55:in `update_stylesheets'
68/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/plugin.rb:53:in `each'
69/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/plugin.rb:53:in `update_stylesheets'
70/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/plugin/rails.rb:16:in `process'
71/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:392:in `process'
72/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:183:in `handle_request'
73/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:110:in `dispatch_unlocked'
74/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:123:in `dispatch'
75/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:122:in `synchronize'
76/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:122:in `dispatch'
77/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:132:in `dispatch_cgi'
78/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:39:in `dispatch'
79/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:76:in `process'
80/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:74:in `synchronize'
81/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:74:in `process'
82/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:159:in `process_client'
83/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in `each'
84/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in `process_client'
85/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run'
86/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `initialize'
87/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `new'
88/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run'
89/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `initialize'
90/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `new'
91/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `run'
92/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:282:in `run'
93/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:281:in `each'
94/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:281:in `run'
95/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:128:in `run'
96/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/command.rb:212:in `run'
97/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:281
98/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:142:in `load_without_new_constant_marking'
99/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:142:in `load'
100/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:521:in `new_constants_in'
101/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:142:in `load'
102/usr/local/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/servers/mongrel.rb:64
103/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
104/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
105/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:153:in `require'
106/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:521:in `new_constants_in'
107/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:153:in `require'
108/usr/local/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/server.rb:49
109/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
110/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
111script/server:3
112*/
113body:before {
114 white-space: pre;
115 font-family: monospace;
116 content: "Sass::SyntaxError: Syntax error in '!!last' at character 5.\A on line 214 of /home/aa/apps/bl6g/public/stylesheets/sass/base.sass\A \A 210: //\A 211: =column(!n = max, !last = false)\A 212: float: left\A 213: @if !n != max\A 214: @if !!last\A 215: margin-right: 10px\A 216: width = !n - 10px\A 217: @if !last\A 218: margin-right: 0px\A 219: width = !n\A 220: @if !n == max\A "; }
  
1/*
2Sass::SyntaxError: Syntax error in '!!last' at character 5.
3on line 214 of /home/aa/apps/bl6g/public/stylesheets/sass/base.sass
4
5210: //
6211: =column(!n = max, !last = false)
7212: float: left
8213: @if !n != max
9214: @if !!last
10215: margin-right: 10px
11216: width = !n - 10px
12217: @if !last
13218: margin-right: 0px
14219: width = !n
15220: @if !n == max
16
17
18Backtrace:
19/home/aa/apps/bl6g/public/stylesheets/sass/base.sass:214
20/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/script/lexer.rb:61:in `token'
21/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/script/lexer.rb:67:in `peek'
22/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/script/parser.rb:137:in `try_tok'
23(eval):2:in `unary_minus'
24(eval):2:in `times_div_or_mod'
25(eval):2:in `plus_or_minus'
26(eval):2:in `relational'
27(eval):2:in `eq_or_neq'
28(eval):2:in `and_expr'
29(eval):2:in `or_expr'
30/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/script/parser.rb:57:in `concat'
31(eval):2:in `expr'
32/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/script/parser.rb:127:in `send'
33/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/script/parser.rb:127:in `assert_expr'
34/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/script/parser.rb:18:in `parse'
35/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/script/parser.rb:24:in `parse'
36/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/script.rb:26:in `parse'
37/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/engine.rb:431:in `parse_script'
38/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/engine.rb:338:in `parse_directive'
39/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/engine.rb:260:in `parse_line'
40/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/engine.rb:180:in `build_tree'
41/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/engine.rb:200:in `append_children'
42/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/engine.rb:199:in `each'
43/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/engine.rb:199:in `append_children'
44/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/engine.rb:190:in `build_tree'
45/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/engine.rb:200:in `append_children'
46/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/engine.rb:199:in `each'
47/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/engine.rb:199:in `append_children'
48/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/engine.rb:190:in `build_tree'
49/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/engine.rb:200:in `append_children'
50/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/engine.rb:199:in `each'
51/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/engine.rb:199:in `append_children'
52/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/engine.rb:124:in `render_to_tree'
53/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/engine.rb:104:in `render'
54/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/plugin.rb:75:in `update_stylesheet'
55/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/plugin.rb:60:in `update_stylesheets'
56/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/plugin.rb:55:in `each'
57/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/plugin.rb:55:in `update_stylesheets'
58/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/plugin.rb:53:in `each'
59/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/plugin.rb:53:in `update_stylesheets'
60/usr/local/lib/ruby/gems/1.8/gems/haml-2.1.0/rails/../lib/sass/plugin/rails.rb:16:in `process'
61/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:392:in `process'
62/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:183:in `handle_request'
63/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:110:in `dispatch_unlocked'
64/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:123:in `dispatch'
65/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:122:in `synchronize'
66/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:122:in `dispatch'
67/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:132:in `dispatch_cgi'
68/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:39:in `dispatch'
69/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:76:in `process'
70/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:74:in `synchronize'
71/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:74:in `process'
72/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:159:in `process_client'
73/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in `each'
74/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in `process_client'
75/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run'
76/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `initialize'
77/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `new'
78/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run'
79/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `initialize'
80/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `new'
81/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `run'
82/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:282:in `run'
83/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:281:in `each'
84/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:281:in `run'
85/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:128:in `run'
86/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/command.rb:212:in `run'
87/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:281
88/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:142:in `load_without_new_constant_marking'
89/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:142:in `load'
90/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:521:in `new_constants_in'
91/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:142:in `load'
92/usr/local/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/servers/mongrel.rb:64
93/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
94/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
95/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:153:in `require'
96/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:521:in `new_constants_in'
97/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:153:in `require'
98/usr/local/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/server.rb:49
99/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
100/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
101script/server:3
102*/
103body:before {
104 white-space: pre;
105 font-family: monospace;
106 content: "Sass::SyntaxError: Syntax error in '!!last' at character 5.\A on line 214 of /home/aa/apps/bl6g/public/stylesheets/sass/base.sass\A \A 210: //\A 211: =column(!n = max, !last = false)\A 212: float: left\A 213: @if !n != max\A 214: @if !!last\A 215: margin-right: 10px\A 216: width = !n - 10px\A 217: @if !last\A 218: margin-right: 0px\A 219: width = !n\A 220: @if !n == max\A "; }
  
1//
2// Sass Base
3// http://gitorious.org/projects/sass-base
4//
5// Sass Base is a small collection of CSS mixins
6// using SASS picked best parts from Yahoo YUI CSS and
7// Blueprint CSS. I'll try to keep Sass Base as minimum
8// as possible. Use it and fork it as you wish,
9// merge requests are always welcome!
10//
11#
12/* Sass Base
13#
14// from YUI Font, percentages overcalucalted
15// Example usage: font-size= !14px
16!1px = 7.6923%
17!2px = 15.3846%
18!3px = 23.0769%
19!4px = 30.7692%
20!5px = 38.4615%
21!6px = 46.1538%
22!7px = 53.8462%
23!8px = 61.5385%
24!9px = 69.2308%
25!10px = 76.9231%
26!11px = 84.6154%
27!12px = 92.3077%
28!13px = 100.0%
29!14px = 107.6923%
30!15px = 115.3846%
31!16px = 123.0769%
32!17px = 130.7692%
33!18px = 138.4615%
34!19px = 146.1538%
35!20px = 153.8462%
36!21px = 161.5385%
37!22px = 169.2308%
38!23px = 176.9231%
39!24px = 184.6154%
40!25px = 192.3077%
41!26px = 200.0%
42!27px = 207.6923%
43!28px = 215.3846%
44!29px = 223.0769%
45!30px = 230.7692%
46!31px = 238.4615%
47!32px = 246.1538%
48!33px = 253.8462%
49!34px = 261.5385%
50!35px = 269.2308%
51!36px = 276.9231%
52!37px = 284.6154%
53!38px = 292.3077%
54!39px = 300.0%
55!40px = 307.6923%
56!41px = 315.3846%
57!42px = 323.0769%
58!43px = 330.7692%
59!44px = 338.4615%
60!45px = 346.1538%
61!46px = 353.8462%
62!47px = 361.5385%
63!48px = 369.2308%
64!49px = 376.9231%
65!50px = 384.6154%
66
67
68/* reset from YUI Reset CSS
69html
70 color: #000
71 background: #fff
72body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, textarea, th, td
73 margin: 0
74 padding: 0
75table
76 border-collapse: collapse
77 border-spacing: 0
78fieldset, img
79 border: 0
80address, caption, cite, code, dfn, em, strong, th, var
81 font-style: normal
82 font-weight: normal
83li
84 list-style: none
85caption, th
86 text-align: left
87h1, h2, h3, h4, h5, h6
88 font-size: 100%
89 font-weight: normal
90q:before, q:after
91 content:''
92abbr, acronym
93 border: 0
94 font-variant: normal
95sup
96 vertical-align: text-top
97sub
98 vertical-align: text-bottom
99input, textarea, select
100 font-family: inherit
101 font-size: inherit
102 font-weight: inherit
103input, textarea, select
104 *font-size: 100%
105legend
106 color: #000
107
108/* Font reset from YUI Fonts CSS
109body
110 font: 13px/1.231 arial,helvetica,clean,sans-serif
111 *font-size: small
112 *font: x-small
113select, input, button, textarea
114 font: 90% arial,helvetica,clean,sans-serif
115table
116 font-size: inherit
117 font: 100%
118pre, code, kbd, samp, tt
119 font-family: monospace
120 *font-size: 108%
121 line-height: 100%
122
123/* Base font from YUI Base CSS with changes
124body
125 # Avoid small horizontal movement between short and long pages,
126 # where one page has got vertical scroll and another does not.
127 overflow-y: scroll
128h1
129 font-size = !18px
130 font-weight: bold
131 margin: 1em 0
132h2
133 font-size = !16px
134 font-weight: bold
135 margin: 1em 0
136h3
137 font-size = !16px
138 font-weight: bold
139 margin: 1em 0
140h4
141 font-weight: bold
142h5
143 font-weight: bold
144h6
145 font-weight: bold
146strong
147 font-weight: bold
148abbr
149 border-bottom: 1px dotted #000
150acronym
151 border-bottom: 1px dotted #000
152em
153 font-style: italic
154blockquote
155 margin: 1em
156ol
157 margin: 1em
158 margin-left: 2em
159ul
160 margin: 1em
161 margin-left: 0
162dl
163 margin: 1em
164 margin-left: 2em
165ol li
166 list-style: decimal outside
167dl dd
168 margin-left: 1em
169table
170 margin-bottom: 1em
171th
172 border: 1px solid #000
173td
174 border: 1px solid #000
175th
176 font-weight: bold
177 text-align: center
178caption
179 margin-bottom: .5em
180 text-align: center
181p
182 margin-bottom: 1em
183fieldset
184 margin-bottom: 1em
185pre
186 margin-bottom: 1em
187input[type=text],input[type=password],textarea
188 width:12.25em
189 *width:11.9em
190
191
192/* Grid inpired from Blueprint Grid
193
194// You can redefine it in your application.sass,
195// for example add '!containerWidth = 850px'
196!containerWidth = 975px
197
198body
199 margin: 10px
200.container
201 width = !containerWidth
202 margin: 0 auto
203
204// Examples:
205// +column(750px) # => usual column
206// +column(750px, last) # => last column
207// +column # => using containerWidth value, it is also last column.
208// Default width value is 975px. You can redefine
209// !containerWidth in your application.sass
210//
211=column(!n = max, !last = false)
212 float: left
213 @if !n != max
214 @if !!last
215 margin-right: 10px
216 width = !n - 10px
217 @if !last
218 margin-right: 0px
219 width = !n
220 @if !n == max
221 margin-right: 0px
222 width = !containerWidth
223
224
225/* Flash messages from Blueprint
226=flash
227 padding: .8em
228 margin-bottom: 1em
229 border: 2px solid #ddd
230.errorExplanation,
231.error
232 +flash
233 background: #FBE3E4
234 border-color: #FBC2C4
235 color: #8a1f11
236 a
237 color: #8a1f11
238.notice
239 +flash
240 background: #FFF6BF
241 border-color: #FFD324
242 color: #514721
243 a
244 color: #514721
245.success
246 +flash
247 background: #E6EFC2
248 border-color: #C6D880
249 color: #264409
250 a
251 color: #264409
252#
253/* End of Sass Base framework!
254#
255#
256#
257#
258#
259#
260#
  
99# published_at :datetime
1010# created_at :datetime
1111# updated_at :datetime
12# slug :string(255)
1213#
1314
1415# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
  
1010# category_id :integer
1111# created_at :datetime
1212# updated_at :datetime
13# user_id :integer
13# user_id :integer not null
1414#
1515
1616# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
  
1919 it 'should be public' do
2020
2121 end
22
23 it 'should return slug when slug present' do
24 page = Page.create(valid_page)
25 page.to_param.should == page.id
26 page.slug = "about"
27 page.to_param.should == "about"
28 end
2229end