Commit 984614a9a9a6f486cd8291339d41c1948610fadb
- Diff rendering mode:
- inline
- side by side
|   | |||
| 6 | 6 | end | |
| 7 | 7 | ||
| 8 | 8 | def show | |
| 9 | @page = Page.find(params[:id]) | ||
| 9 | @page = Page.find_by_slug_or_id(params[:id]) | ||
| 10 | 10 | end | |
| 11 | 11 | ||
| 12 | 12 | def new | |
| … | … | ||
| 14 | 14 | end | |
| 15 | 15 | ||
| 16 | 16 | def edit | |
| 17 | @page = Page.find(params[:id]) | ||
| 17 | @page = Page.find_by_slug_or_id(params[:id]) | ||
| 18 | 18 | end | |
| 19 | 19 | ||
| 20 | 20 | def create | |
| … | … | ||
| 29 | 29 | end | |
| 30 | 30 | ||
| 31 | 31 | def update | |
| 32 | @page = Page.find(params[:id]) | ||
| 32 | @page = Page.find_by_slug_or_id(params[:id]) | ||
| 33 | 33 | ||
| 34 | 34 | if @page.update_attributes(params[:page]) | |
| 35 | 35 | flash[:success] = 'Update successfully!' | |
| … | … | ||
| 40 | 40 | end | |
| 41 | 41 | ||
| 42 | 42 | def destroy | |
| 43 | @page = Page.find(params[:id]) | ||
| 43 | @page = Page.find_by_slug_or_id(params[:id]) | ||
| 44 | 44 | ||
| 45 | 45 | if @page.destroy | |
| 46 | 46 | flash[:success] = 'Page deleted successfully!' |
app/models/page.rb
(13 / 0)
|   | |||
| 9 | 9 | # published_at :datetime | |
| 10 | 10 | # created_at :datetime | |
| 11 | 11 | # updated_at :datetime | |
| 12 | # slug :string(255) | ||
| 12 | 13 | # | |
| 13 | 14 | ||
| 14 | 15 | class Page < ActiveRecord::Base | |
| 15 | 16 | has_many :comments, :as => :commentable | |
| 16 | 17 | ||
| 17 | 18 | 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 | ||
| 18 | 31 | end |
app/models/post.rb
(1 / 1)
|   | |||
| 10 | 10 | # category_id :integer | |
| 11 | 11 | # created_at :datetime | |
| 12 | 12 | # updated_at :datetime | |
| 13 | # user_id :integer | ||
| 13 | # user_id :integer not null | ||
| 14 | 14 | # | |
| 15 | 15 | ||
| 16 | 16 | class Post < ActiveRecord::Base |
|   | |||
| 1 | class 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 | ||
| 9 | end |
db/schema.rb
(3 / 2)
|   | |||
| 9 | 9 | # | |
| 10 | 10 | # It's strongly recommended to check this file into your version control system. | |
| 11 | 11 | ||
| 12 | ActiveRecord::Schema.define(:version => 20081016223035) do | ||
| 12 | ActiveRecord::Schema.define(:version => 20090409114716) do | ||
| 13 | 13 | ||
| 14 | 14 | create_table "categories", :force => true do |t| | |
| 15 | 15 | t.string "name", :null => false | |
| … | … | ||
| 49 | 49 | t.datetime "published_at" | |
| 50 | 50 | t.datetime "created_at" | |
| 51 | 51 | t.datetime "updated_at" | |
| 52 | t.string "slug" | ||
| 52 | 53 | end | |
| 53 | 54 | ||
| 54 | 55 | create_table "posts", :force => true do |t| | |
| … | … | ||
| 60 | 60 | t.integer "category_id" | |
| 61 | 61 | t.datetime "created_at" | |
| 62 | 62 | t.datetime "updated_at" | |
| 63 | t.integer "user_id" | ||
| 63 | t.integer "user_id", :null => false | ||
| 64 | 64 | end | |
| 65 | 65 | ||
| 66 | 66 | create_table "settings", :force => true do |t| |
public/stylesheets/application.css
(0 / 116)
|   | |||
| 1 | /* | ||
| 2 | Sass::SyntaxError: Syntax error in '!!last' at character 5. | ||
| 3 | on line 214 of /home/aa/apps/bl6g/public/stylesheets/sass/base.sass | ||
| 4 | |||
| 5 | 210: // | ||
| 6 | 211: =column(!n = max, !last = false) | ||
| 7 | 212: float: left | ||
| 8 | 213: @if !n != max | ||
| 9 | 214: @if !!last | ||
| 10 | 215: margin-right: 10px | ||
| 11 | 216: width = !n - 10px | ||
| 12 | 217: @if !last | ||
| 13 | 218: margin-right: 0px | ||
| 14 | 219: width = !n | ||
| 15 | 220: @if !n == max | ||
| 16 | |||
| 17 | |||
| 18 | Backtrace: | ||
| 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' | ||
| 111 | script/server:3 | ||
| 112 | */ | ||
| 113 | body: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 "; } |
public/stylesheets/base.css
(0 / 106)
|   | |||
| 1 | /* | ||
| 2 | Sass::SyntaxError: Syntax error in '!!last' at character 5. | ||
| 3 | on line 214 of /home/aa/apps/bl6g/public/stylesheets/sass/base.sass | ||
| 4 | |||
| 5 | 210: // | ||
| 6 | 211: =column(!n = max, !last = false) | ||
| 7 | 212: float: left | ||
| 8 | 213: @if !n != max | ||
| 9 | 214: @if !!last | ||
| 10 | 215: margin-right: 10px | ||
| 11 | 216: width = !n - 10px | ||
| 12 | 217: @if !last | ||
| 13 | 218: margin-right: 0px | ||
| 14 | 219: width = !n | ||
| 15 | 220: @if !n == max | ||
| 16 | |||
| 17 | |||
| 18 | Backtrace: | ||
| 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' | ||
| 101 | script/server:3 | ||
| 102 | */ | ||
| 103 | body: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 "; } |
public/stylesheets/sass/base.sass
(0 / 260)
|   | |||
| 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 | ||
| 69 | html | ||
| 70 | color: #000 | ||
| 71 | background: #fff | ||
| 72 | body, 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 | ||
| 75 | table | ||
| 76 | border-collapse: collapse | ||
| 77 | border-spacing: 0 | ||
| 78 | fieldset, img | ||
| 79 | border: 0 | ||
| 80 | address, caption, cite, code, dfn, em, strong, th, var | ||
| 81 | font-style: normal | ||
| 82 | font-weight: normal | ||
| 83 | li | ||
| 84 | list-style: none | ||
| 85 | caption, th | ||
| 86 | text-align: left | ||
| 87 | h1, h2, h3, h4, h5, h6 | ||
| 88 | font-size: 100% | ||
| 89 | font-weight: normal | ||
| 90 | q:before, q:after | ||
| 91 | content:'' | ||
| 92 | abbr, acronym | ||
| 93 | border: 0 | ||
| 94 | font-variant: normal | ||
| 95 | sup | ||
| 96 | vertical-align: text-top | ||
| 97 | sub | ||
| 98 | vertical-align: text-bottom | ||
| 99 | input, textarea, select | ||
| 100 | font-family: inherit | ||
| 101 | font-size: inherit | ||
| 102 | font-weight: inherit | ||
| 103 | input, textarea, select | ||
| 104 | *font-size: 100% | ||
| 105 | legend | ||
| 106 | color: #000 | ||
| 107 | |||
| 108 | /* Font reset from YUI Fonts CSS | ||
| 109 | body | ||
| 110 | font: 13px/1.231 arial,helvetica,clean,sans-serif | ||
| 111 | *font-size: small | ||
| 112 | *font: x-small | ||
| 113 | select, input, button, textarea | ||
| 114 | font: 90% arial,helvetica,clean,sans-serif | ||
| 115 | table | ||
| 116 | font-size: inherit | ||
| 117 | font: 100% | ||
| 118 | pre, 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 | ||
| 124 | body | ||
| 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 | ||
| 128 | h1 | ||
| 129 | font-size = !18px | ||
| 130 | font-weight: bold | ||
| 131 | margin: 1em 0 | ||
| 132 | h2 | ||
| 133 | font-size = !16px | ||
| 134 | font-weight: bold | ||
| 135 | margin: 1em 0 | ||
| 136 | h3 | ||
| 137 | font-size = !16px | ||
| 138 | font-weight: bold | ||
| 139 | margin: 1em 0 | ||
| 140 | h4 | ||
| 141 | font-weight: bold | ||
| 142 | h5 | ||
| 143 | font-weight: bold | ||
| 144 | h6 | ||
| 145 | font-weight: bold | ||
| 146 | strong | ||
| 147 | font-weight: bold | ||
| 148 | abbr | ||
| 149 | border-bottom: 1px dotted #000 | ||
| 150 | acronym | ||
| 151 | border-bottom: 1px dotted #000 | ||
| 152 | em | ||
| 153 | font-style: italic | ||
| 154 | blockquote | ||
| 155 | margin: 1em | ||
| 156 | ol | ||
| 157 | margin: 1em | ||
| 158 | margin-left: 2em | ||
| 159 | ul | ||
| 160 | margin: 1em | ||
| 161 | margin-left: 0 | ||
| 162 | dl | ||
| 163 | margin: 1em | ||
| 164 | margin-left: 2em | ||
| 165 | ol li | ||
| 166 | list-style: decimal outside | ||
| 167 | dl dd | ||
| 168 | margin-left: 1em | ||
| 169 | table | ||
| 170 | margin-bottom: 1em | ||
| 171 | th | ||
| 172 | border: 1px solid #000 | ||
| 173 | td | ||
| 174 | border: 1px solid #000 | ||
| 175 | th | ||
| 176 | font-weight: bold | ||
| 177 | text-align: center | ||
| 178 | caption | ||
| 179 | margin-bottom: .5em | ||
| 180 | text-align: center | ||
| 181 | p | ||
| 182 | margin-bottom: 1em | ||
| 183 | fieldset | ||
| 184 | margin-bottom: 1em | ||
| 185 | pre | ||
| 186 | margin-bottom: 1em | ||
| 187 | input[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 | |||
| 198 | body | ||
| 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 | # |
spec/fixtures/pages.yml
(1 / 0)
|   | |||
| 9 | 9 | # published_at :datetime | |
| 10 | 10 | # created_at :datetime | |
| 11 | 11 | # updated_at :datetime | |
| 12 | # slug :string(255) | ||
| 12 | 13 | # | |
| 13 | 14 | ||
| 14 | 15 | # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html |
spec/fixtures/posts.yml
(1 / 1)
|   | |||
| 10 | 10 | # category_id :integer | |
| 11 | 11 | # created_at :datetime | |
| 12 | 12 | # updated_at :datetime | |
| 13 | # user_id :integer | ||
| 13 | # user_id :integer not null | ||
| 14 | 14 | # | |
| 15 | 15 | ||
| 16 | 16 | # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html |
spec/models/page_spec.rb
(7 / 0)
|   | |||
| 19 | 19 | it 'should be public' do | |
| 20 | 20 | ||
| 21 | 21 | 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 | ||
| 22 | 29 | end |

