From 10ad15861f5eb48c2634c94a62f51eb83e559f66 Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Sat, 3 Apr 2010 18:22:17 -0300 Subject: :action => "update" used in a non RESTful way confuses --- actionpack/lib/action_view/helpers/form_helper.rb | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb index 6a14f0be9c..6aaaac57a6 100644 --- a/actionpack/lib/action_view/helpers/form_helper.rb +++ b/actionpack/lib/action_view/helpers/form_helper.rb @@ -121,7 +121,7 @@ module ActionView # The generic way to call +form_for+ yields a form builder around a # model: # - # <%= form_for :person, :url => { :action => "update" } do |f| %> + # <%= form_for :person do |f| %> # <%= f.error_messages %> # First name: <%= f.text_field :first_name %>
# Last name : <%= f.text_field :last_name %>
@@ -145,7 +145,7 @@ module ActionView # If the instance variable is not @person you can pass the actual # record as the second argument: # - # <%= form_for :person, person, :url => { :action => "update" } do |f| %> + # <%= form_for :person, person do |f| %> # ... # <% end %> # @@ -177,7 +177,7 @@ module ActionView # possible to use both the stand-alone FormHelper methods and methods # from FormTagHelper. For example: # - # <%= form_for :person, @person, :url => { :action => "update" } do |f| %> + # <%= form_for :person, @person do |f| %> # First name: <%= f.text_field :first_name %> # Last name : <%= f.text_field :last_name %> # Biography : <%= text_area :person, :biography %> @@ -265,7 +265,7 @@ module ActionView # custom builder. For example, let's say you made a helper to # automatically add labels to form inputs. # - # <%= form_for :person, @person, :url => { :action => "update" }, :builder => LabellingFormBuilder do |f| %> + # <%= form_for :person, @person, :builder => LabellingFormBuilder do |f| %> # <%= f.text_field :first_name %> # <%= f.text_field :last_name %> # <%= text_area :person, :biography %> @@ -342,7 +342,7 @@ module ActionView # # === Generic Examples # - # <%= form_for @person, :url => { :action => "update" } do |person_form| %> + # <%= form_for @person do |person_form| %> # First name: <%= person_form.text_field :first_name %> # Last name : <%= person_form.text_field :last_name %> # @@ -404,7 +404,7 @@ module ActionView # # This model can now be used with a nested fields_for, like so: # - # <%= form_for @person, :url => { :action => "update" } do |person_form| %> + # <%= form_for @person do |person_form| %> # ... # <%= person_form.fields_for :address do |address_fields| %> # Street : <%= address_fields.text_field :street %> @@ -433,7 +433,7 @@ module ActionView # with a value that evaluates to +true+, you will destroy the associated # model (eg. 1, '1', true, or 'true'): # - # <%= form_for @person, :url => { :action => "update" } do |person_form| %> + # <%= form_for @person do |person_form| %> # ... # <%= person_form.fields_for :address do |address_fields| %> # ... @@ -461,7 +461,7 @@ module ActionView # the nested fields_for call will be repeated for each instance in the # collection: # - # <%= form_for @person, :url => { :action => "update" } do |person_form| %> + # <%= form_for @person do |person_form| %> # ... # <%= person_form.fields_for :projects do |project_fields| %> # <% if project_fields.object.active? %> @@ -472,7 +472,7 @@ module ActionView # # It's also possible to specify the instance to be used: # - # <%= form_for @person, :url => { :action => "update" } do |person_form| %> + # <%= form_for @person do |person_form| %> # ... # <% @person.projects.each do |project| %> # <% if project.active? %> @@ -485,7 +485,7 @@ module ActionView # # Or a collection to be used: # - # <%= form_for @person, :url => { :action => "update" } do |person_form| %> + # <%= form_for @person do |person_form| %> # ... # <%= person_form.fields_for :projects, @active_projects do |project_fields| %> # Name: <%= project_fields.text_field :name %> @@ -514,7 +514,7 @@ module ActionView # parameter with a value that evaluates to +true+ # (eg. 1, '1', true, or 'true'): # - # <%= form_for @person, :url => { :action => "update" } do |person_form| %> + # <%= form_for @person do |person_form| %> # ... # <%= person_form.fields_for :projects do |project_fields| %> # Delete: <%= project_fields.check_box :_destroy %> -- cgit v1.2.3 From 8f9becb42632d68ae84639b19022ff7d64666a30 Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Sat, 3 Apr 2010 18:34:28 -0300 Subject: :action => "create" added to form_for with name only to show appropiate behavior --- actionpack/lib/action_view/helpers/form_helper.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb index 6aaaac57a6..9467a0912a 100644 --- a/actionpack/lib/action_view/helpers/form_helper.rb +++ b/actionpack/lib/action_view/helpers/form_helper.rb @@ -121,7 +121,7 @@ module ActionView # The generic way to call +form_for+ yields a form builder around a # model: # - # <%= form_for :person do |f| %> + # <%= form_for :person, :url => { :action => "create" } do |f| %> # <%= f.error_messages %> # First name: <%= f.text_field :first_name %>
# Last name : <%= f.text_field :last_name %>
@@ -145,7 +145,7 @@ module ActionView # If the instance variable is not @person you can pass the actual # record as the second argument: # - # <%= form_for :person, person do |f| %> + # <%= form_for :person, person, :url => { :action => "create" } do |f| %> # ... # <% end %> # @@ -177,7 +177,7 @@ module ActionView # possible to use both the stand-alone FormHelper methods and methods # from FormTagHelper. For example: # - # <%= form_for :person, @person do |f| %> + # <%= form_for :person, @person, :url => { :action => "create" } do |f| %> # First name: <%= f.text_field :first_name %> # Last name : <%= f.text_field :last_name %> # Biography : <%= text_area :person, :biography %> @@ -265,7 +265,7 @@ module ActionView # custom builder. For example, let's say you made a helper to # automatically add labels to form inputs. # - # <%= form_for :person, @person, :builder => LabellingFormBuilder do |f| %> + # <%= form_for :person, @person, :url => { :action => "create" }, :builder => LabellingFormBuilder do |f| %> # <%= f.text_field :first_name %> # <%= f.text_field :last_name %> # <%= text_area :person, :biography %> @@ -354,13 +354,13 @@ module ActionView # ...or if you have an object that needs to be represented as a different # parameter, like a Client that acts as a Person: # - # <%= fields_for :person, @client do |permission_fields| %> + # <%= fields_for :person, @client, :url => { :action => "create" } do |permission_fields| %> # Admin?: <%= permission_fields.check_box :admin %> # <% end %> # # ...or if you don't have an object, just a name of the parameter: # - # <%= fields_for :person do |permission_fields| %> + # <%= fields_for :person, :url => { :action => "create" } do |permission_fields| %> # Admin?: <%= permission_fields.check_box :admin %> # <% end %> # -- cgit v1.2.3 From 8fa3183436cedd7248b47b4aa1fda86e77396c9a Mon Sep 17 00:00:00 2001 From: Jaime Iniesta Date: Sun, 4 Apr 2010 11:06:16 +0200 Subject: Fixed layouts_and_rendering guide so that it validates XHTML 1.0 Strict --- railties/guides/source/layouts_and_rendering.textile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/railties/guides/source/layouts_and_rendering.textile b/railties/guides/source/layouts_and_rendering.textile index 2cb98e9ee6..1ddba807e0 100644 --- a/railties/guides/source/layouts_and_rendering.textile +++ b/railties/guides/source/layouts_and_rendering.textile @@ -510,7 +510,7 @@ def show end -Make sure you use +and return+ and not +&& return+ because while the former will work, the latter will not due to operator precedence in the Ruby Language. +Make sure you use +and return+ and not +&& return+ because while the former will work, the latter will not due to operator precedence in the Ruby Language. Note that the implicit render done by ActionController detects if +render+ has been called, and thus avoids this error. Therefore, the following will work without errors: @@ -747,7 +747,7 @@ You can even use dynamic paths such as +cache/#{current_site}/main/display+. h5. Linking to CSS Files with +stylesheet_link_tag+ -The +stylesheet_link_tag+ helper returns an HTML ++ tag for each source provided. Rails looks in +public/stylesheets+ for these files by default, but you can specify a full path relative to the document root, or a URL, if you prefer. For example, to include +public/stylesheets/main.cs+: +The +stylesheet_link_tag+ helper returns an HTML +<link>+ tag for each source provided. Rails looks in +public/stylesheets+ for these files by default, but you can specify a full path relative to the document root, or a URL, if you prefer. For example, to include +public/stylesheets/main.cs+: <%= stylesheet_link_tag "main" %> -- cgit v1.2.3 From c52bec77f53a1dc4e3f61fbd45460b99f8f46fb1 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Sun, 4 Apr 2010 01:36:12 -0700 Subject: sanity check arguments in guides generation collapsed into a single WARNINGS flag, EDGE_GUIDES renamed to EDGE to be coherent with the rest, preamble revised --- railties/guides/rails_guides/generator.rb | 47 +++++++++++++++---------------- 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/railties/guides/rails_guides/generator.rb b/railties/guides/rails_guides/generator.rb index 3d48d6b708..1454aed6e4 100644 --- a/railties/guides/rails_guides/generator.rb +++ b/railties/guides/rails_guides/generator.rb @@ -9,27 +9,23 @@ # # Some arguments may be passed via environment variables: # -# WARN_BROKEN_LINKS -# Internal references (anchors) are checked. If a reference is broken -# levenshtein distance is used to suggest an existing one. This is useful -# since IDs are generated by Textile from titles and thus rewordings alter -# them. +# WARNINGS +# If you are writing a guide, please work always with WARNINGS=1. Users can +# generate the guides, and thus this flag is off by default. # -# WARN_DUPLICATE_HEADERS -# Warns about duplicate IDs in headers. Please do resolve them, if any, -# so guides are valid XHTML. +# Internal links (anchors) are checked. If a reference is broken levenshtein +# distance is used to suggest an existing one. This is useful since IDs are +# generated by Textile from headers and thus edits alter them. # -# This check only happens if WARN_BROKEN_LINKS is also active. -# -# EDGE_GUIDES -# Set to "1" to indicate edge guides are generated. +# Also detects duplicated IDs. They happen if there are headers with the same +# text. Please do resolve them, if any, so guides are valid XHTML. # # ALL -# Generate all guides. - +# Set to "1" to force the generation of all guides. +# # ONLY -# If you want to generate only one or a set of guides. -# Prefixes are enough: +# Use ONLY if you want to generate only one or a set of guides. Prefixes are +# enough: # # # generates only association_basics.html # ONLY=assoc ruby rails_guides.rb @@ -39,9 +35,12 @@ # # generates only # ONLY=assoc,migrations ruby rails_guides.rb # -# Note that if you are working on a guide, generation will -# by default process only that one, so ONLY is rarely used -# nowadays. +# Note that if you are working on a guide generation will by default process +# only that one, so ONLY is rarely used nowadays. +# +# EDGE +# Set to "1" to indicate generated guides should be marked as edge. This +# inserts a badge and changes the preamble of the home page. # # --------------------------------------------------------------------------- @@ -85,7 +84,7 @@ module RailsGuides end def set_edge - @edge = ENV['EDGE_GUIDES'] == '1' + @edge = ENV['EDGE'] == '1' end def generate_guides @@ -97,11 +96,11 @@ module RailsGuides def guides_to_generate guides = Dir.entries(source_dir).grep(GUIDES_RE) - ENV.key?("ONLY") ? select_only(guides) : guides + ENV.key?('ONLY') ? select_only(guides) : guides end def select_only(guides) - prefixes = ENV["ONLY"].split(",").map(&:strip) + prefixes = ENV['ONLY'].split(",").map(&:strip) guides.select do |guide| prefixes.any? {|p| guide.start_with?(p)} end @@ -138,7 +137,7 @@ module RailsGuides result = view.render(:layout => 'layout', :text => textile(body)) - warn_about_broken_links(result) if ENV.key?("WARN_BROKEN_LINKS") + warn_about_broken_links(result) if ENV['WARNINGS'] == '1' end f.write result @@ -229,7 +228,7 @@ module RailsGuides anchors = Set.new html.scan(/ Date: Sun, 4 Apr 2010 11:28:25 +0200 Subject: Fixing credits page so that it validates XHTML 1.0 Strict and adding myself to it --- railties/guides/images/jaimeiniesta.jpg | Bin 0 -> 11913 bytes railties/guides/source/credits.html.erb | 28 ++++++++++++++++------------ 2 files changed, 16 insertions(+), 12 deletions(-) create mode 100644 railties/guides/images/jaimeiniesta.jpg diff --git a/railties/guides/images/jaimeiniesta.jpg b/railties/guides/images/jaimeiniesta.jpg new file mode 100644 index 0000000000..445f048d92 Binary files /dev/null and b/railties/guides/images/jaimeiniesta.jpg differ diff --git a/railties/guides/source/credits.html.erb b/railties/guides/source/credits.html.erb index e026628e6a..0f203765ac 100644 --- a/railties/guides/source/credits.html.erb +++ b/railties/guides/source/credits.html.erb @@ -8,53 +8,57 @@

Rails Documentation Team

<%= author('Mike Gunderloy', 'mgunderloy') do %> -

Mike Gunderloy is a consultant with ActionRails. He brings 25 years of experience in a variety of languages to bear on his current work with Rails. His near-daily links and other blogging can be found at A Fresh Cup and he twitters too much.

+ Mike Gunderloy is a consultant with ActionRails. He brings 25 years of experience in a variety of languages to bear on his current work with Rails. His near-daily links and other blogging can be found at A Fresh Cup and he twitters too much. <% end %> <%= author('Pratik Naik', 'lifo') do %> -

Pratik Naik is a Ruby on Rails consultant with ActionRails and also a member of the Rails core team. He maintains a blog at has_many :bugs, :through => :rails and has an active twitter account.

+ Pratik Naik is a Ruby on Rails consultant with ActionRails and also a member of the Rails core team. He maintains a blog at has_many :bugs, :through => :rails and has an active twitter account. <% end %> <%= author('Xavier Noria', 'fxn', 'fxn.png') do %> -

Xavier has been into Rails since 2005, he is currently a Rails consultant. Xavier is Rails committer and enjoys combining his passion for Rails and his past life as a proofreader of math textbooks. Oh, he also tweets and can be found everywhere as "fxn".

+ Xavier has been into Rails since 2005, he is currently a Rails consultant. Xavier is Rails committer and enjoys combining his passion for Rails and his past life as a proofreader of math textbooks. Oh, he also tweets and can be found everywhere as "fxn". <% end %>

Rails Guides Designers

<%= author('Jason Zimdars', 'jz') do %> -

Jason Zimdars is an experienced creative director and web designer who has lead UI and UX design for numerous websites and web applications. You can see more of his design and writing at Thinkcage.com or follow him on Twitter.

+ Jason Zimdars is an experienced creative director and web designer who has lead UI and UX design for numerous websites and web applications. You can see more of his design and writing at Thinkcage.com or follow him on Twitter. <% end %>

Rails Guides Authors

<%= author('Frederick Cheung', 'fcheung') do %> -

Frederick Cheung is Chief Wizard at Texperts where he has been using Rails since 2006. He is based in Cambridge (UK) and when not consuming fine ales he blogs at spacevatican.org.

+ Frederick Cheung is Chief Wizard at Texperts where he has been using Rails since 2006. He is based in Cambridge (UK) and when not consuming fine ales he blogs at spacevatican.org. <% end %> <%= author('Tore Darell', 'toretore') do %> -

Tore Darell is an independent developer based in Menton, France who specialises in cruft-free web applications using Ruby, Rails and unobtrusive JavaScript. His home on the internet is his blog Sneaky Abstractions.

+ Tore Darell is an independent developer based in Menton, France who specialises in cruft-free web applications using Ruby, Rails and unobtrusive JavaScript. His home on the internet is his blog Sneaky Abstractions. <% end %> <%= author('Jeff Dean', 'zilkey') do %> -

Jeff Dean is a software engineer with Pivotal Labs.

+ Jeff Dean is a software engineer with Pivotal Labs. <% end %> <%= author('Cássio Marques', 'cmarques') do %> -

Cássio Marques is a Brazilian software developer working with different programming languages such as Ruby, JavaScript, CPP and Java, as an independent consultant. He blogs at /* CODIFICANDO */, which is mainly written in Portuguese, but will soon get a new section for posts with English translation. + Cássio Marques is a Brazilian software developer working with different programming languages such as Ruby, JavaScript, CPP and Java, as an independent consultant. He blogs at /* CODIFICANDO */, which is mainly written in Portuguese, but will soon get a new section for posts with English translation. <% end %> <%= author('James Miller', 'bensie') do %> -

James Miller is a software developer for JK Tech in San Diego, CA. Find me on GitHub, Gmail, Twitter, and Freenode as "bensie".

+ James Miller is a software developer for JK Tech in San Diego, CA. Find me on GitHub, Gmail, Twitter, and Freenode as "bensie". <% end %> <%= author('Emilio Tagua', 'miloops') do %> -

Emilio Tagua —a.k.a. miloops— is an Argentinian entrepreneur, developer, open source contributor and Rails evangelist. Cofounder of Eventioz. He has been using Rails since 2006 and contributing since early 2008. Can be found at gmail, twitter, freenode, everywhere as "miloops".

+ Emilio Tagua —a.k.a. miloops— is an Argentinian entrepreneur, developer, open source contributor and Rails evangelist. Cofounder of Eventioz. He has been using Rails since 2006 and contributing since early 2008. Can be found at gmail, twitter, freenode, everywhere as "miloops". <% end %> <%= author('Heiko Webers', 'hawe') do %> -

Heiko Webers is the founder of bauland42, a German web application security consulting and development company focused on Ruby on Rails. He blogs at the Ruby on Rails Security Project. After 10 years of desktop application development, Heiko has rarely looked back.

+ Heiko Webers is the founder of bauland42, a German web application security consulting and development company focused on Ruby on Rails. He blogs at the Ruby on Rails Security Project. After 10 years of desktop application development, Heiko has rarely looked back. <% end %> <%= author('Mikel Lindsaar', 'raasdnil') do %> -

Mikel Lindsaar has been working with Rails since 2006 and is the author of the Ruby Mail gem and core contributor (he helped re-write Action Mailer's API). Mikel has a blog and tweets. + Mikel Lindsaar has been working with Rails since 2006 and is the author of the Ruby Mail gem and core contributor (he helped re-write Action Mailer's API). Mikel has a blog and tweets. +<% end %> + +<%= author('Jaime Iniesta', 'jaimeiniesta', 'jaimeiniesta.jpg') do %> + Jaime Iniesta works as a Ruby on Rails freelance developer since 2005. He's a member of ProRuby, co-founder of the Spanish Ruby Users Group, member of Spain.rb, and organizer of Conferencia Rails and EuRuKo 2009. Jaime has a blog and tweets. <% end %> -- cgit v1.2.3 From ac8b71cc2032bd352cbe6c078bdff55b236cab8a Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Sun, 4 Apr 2010 02:30:31 -0700 Subject: guides assets are now centralized in the assets directory, with standard subdirs --- railties/guides/assets/images/belongs_to.png | Bin 0 -> 34017 bytes railties/guides/assets/images/book_icon.gif | Bin 0 -> 337 bytes railties/guides/assets/images/bullet.gif | Bin 0 -> 60 bytes railties/guides/assets/images/challenge.png | Bin 0 -> 54134 bytes railties/guides/assets/images/chapters_icon.gif | Bin 0 -> 628 bytes railties/guides/assets/images/check_bullet.gif | Bin 0 -> 384 bytes .../guides/assets/images/credits_pic_blank.gif | Bin 0 -> 613 bytes railties/guides/assets/images/csrf.png | Bin 0 -> 41996 bytes .../assets/images/customized_error_messages.png | Bin 0 -> 5055 bytes railties/guides/assets/images/edge_badge.png | Bin 0 -> 7945 bytes railties/guides/assets/images/error_messages.png | Bin 0 -> 14645 bytes railties/guides/assets/images/feature_tile.gif | Bin 0 -> 43 bytes railties/guides/assets/images/footer_tile.gif | Bin 0 -> 44 bytes railties/guides/assets/images/fxn.png | Bin 0 -> 20664 bytes railties/guides/assets/images/grey_bullet.gif | Bin 0 -> 45 bytes railties/guides/assets/images/habtm.png | Bin 0 -> 63801 bytes railties/guides/assets/images/has_many.png | Bin 0 -> 38582 bytes railties/guides/assets/images/has_many_through.png | Bin 0 -> 100220 bytes railties/guides/assets/images/has_one.png | Bin 0 -> 39022 bytes railties/guides/assets/images/has_one_through.png | Bin 0 -> 92594 bytes railties/guides/assets/images/header_backdrop.png | Bin 0 -> 882 bytes railties/guides/assets/images/header_tile.gif | Bin 0 -> 44 bytes .../assets/images/i18n/demo_localized_pirate.png | Bin 0 -> 15027 bytes .../assets/images/i18n/demo_translated_en.png | Bin 0 -> 12057 bytes .../assets/images/i18n/demo_translated_pirate.png | Bin 0 -> 13392 bytes .../images/i18n/demo_translation_missing.png | Bin 0 -> 13143 bytes .../assets/images/i18n/demo_untranslated.png | Bin 0 -> 11925 bytes railties/guides/assets/images/icons/README | 5 + railties/guides/assets/images/icons/callouts/1.png | Bin 0 -> 329 bytes .../guides/assets/images/icons/callouts/10.png | Bin 0 -> 361 bytes .../guides/assets/images/icons/callouts/11.png | Bin 0 -> 565 bytes .../guides/assets/images/icons/callouts/12.png | Bin 0 -> 617 bytes .../guides/assets/images/icons/callouts/13.png | Bin 0 -> 623 bytes .../guides/assets/images/icons/callouts/14.png | Bin 0 -> 411 bytes .../guides/assets/images/icons/callouts/15.png | Bin 0 -> 640 bytes railties/guides/assets/images/icons/callouts/2.png | Bin 0 -> 353 bytes railties/guides/assets/images/icons/callouts/3.png | Bin 0 -> 350 bytes railties/guides/assets/images/icons/callouts/4.png | Bin 0 -> 345 bytes railties/guides/assets/images/icons/callouts/5.png | Bin 0 -> 348 bytes railties/guides/assets/images/icons/callouts/6.png | Bin 0 -> 355 bytes railties/guides/assets/images/icons/callouts/7.png | Bin 0 -> 344 bytes railties/guides/assets/images/icons/callouts/8.png | Bin 0 -> 357 bytes railties/guides/assets/images/icons/callouts/9.png | Bin 0 -> 357 bytes railties/guides/assets/images/icons/caution.png | Bin 0 -> 2554 bytes railties/guides/assets/images/icons/example.png | Bin 0 -> 2354 bytes railties/guides/assets/images/icons/home.png | Bin 0 -> 1340 bytes railties/guides/assets/images/icons/important.png | Bin 0 -> 2657 bytes railties/guides/assets/images/icons/next.png | Bin 0 -> 1302 bytes railties/guides/assets/images/icons/note.png | Bin 0 -> 2730 bytes railties/guides/assets/images/icons/prev.png | Bin 0 -> 1348 bytes railties/guides/assets/images/icons/tip.png | Bin 0 -> 2602 bytes railties/guides/assets/images/icons/up.png | Bin 0 -> 1320 bytes railties/guides/assets/images/icons/warning.png | Bin 0 -> 2828 bytes railties/guides/assets/images/nav_arrow.gif | Bin 0 -> 427 bytes railties/guides/assets/images/polymorphic.png | Bin 0 -> 85248 bytes railties/guides/assets/images/posts_index.png | Bin 0 -> 60846 bytes .../guides/assets/images/rails_guides_logo.gif | Bin 0 -> 5114 bytes railties/guides/assets/images/rails_logo_remix.gif | Bin 0 -> 8533 bytes railties/guides/assets/images/rails_welcome.png | Bin 0 -> 106417 bytes railties/guides/assets/images/session_fixation.png | Bin 0 -> 47860 bytes railties/guides/assets/images/tab_grey.gif | Bin 0 -> 4924 bytes railties/guides/assets/images/tab_info.gif | Bin 0 -> 4762 bytes railties/guides/assets/images/tab_note.gif | Bin 0 -> 4807 bytes railties/guides/assets/images/tab_red.gif | Bin 0 -> 4753 bytes railties/guides/assets/images/tab_yellow.gif | Bin 0 -> 4759 bytes railties/guides/assets/images/tab_yellow.png | Bin 0 -> 1611 bytes .../assets/images/validation_error_messages.png | Bin 0 -> 1107 bytes .../guides/assets/javascripts/code_highlighter.js | 188 +++++++++ railties/guides/assets/javascripts/guides.js | 7 + railties/guides/assets/javascripts/highlighters.js | 90 ++++ railties/guides/assets/stylesheets/main.css | 452 +++++++++++++++++++++ railties/guides/assets/stylesheets/print.css | 52 +++ railties/guides/assets/stylesheets/reset.css | 43 ++ railties/guides/assets/stylesheets/style.css | 13 + railties/guides/assets/stylesheets/syntax.css | 31 ++ .../guides/files/javascripts/code_highlighter.js | 188 --------- railties/guides/files/javascripts/guides.js | 7 - railties/guides/files/javascripts/highlighters.js | 90 ---- railties/guides/files/stylesheets/main.css | 452 --------------------- railties/guides/files/stylesheets/print.css | 52 --- railties/guides/files/stylesheets/reset.css | 43 -- railties/guides/files/stylesheets/style.css | 13 - railties/guides/files/stylesheets/syntax.css | 31 -- railties/guides/images/belongs_to.png | Bin 34017 -> 0 bytes railties/guides/images/book_icon.gif | Bin 337 -> 0 bytes railties/guides/images/bullet.gif | Bin 60 -> 0 bytes railties/guides/images/challenge.png | Bin 54134 -> 0 bytes railties/guides/images/chapters_icon.gif | Bin 628 -> 0 bytes railties/guides/images/check_bullet.gif | Bin 384 -> 0 bytes railties/guides/images/credits_pic_blank.gif | Bin 613 -> 0 bytes railties/guides/images/csrf.png | Bin 41996 -> 0 bytes .../guides/images/customized_error_messages.png | Bin 5055 -> 0 bytes railties/guides/images/edge_badge.png | Bin 7945 -> 0 bytes railties/guides/images/error_messages.png | Bin 14645 -> 0 bytes railties/guides/images/feature_tile.gif | Bin 43 -> 0 bytes railties/guides/images/footer_tile.gif | Bin 44 -> 0 bytes railties/guides/images/fxn.png | Bin 20664 -> 0 bytes railties/guides/images/grey_bullet.gif | Bin 45 -> 0 bytes railties/guides/images/habtm.png | Bin 63801 -> 0 bytes railties/guides/images/has_many.png | Bin 38582 -> 0 bytes railties/guides/images/has_many_through.png | Bin 100220 -> 0 bytes railties/guides/images/has_one.png | Bin 39022 -> 0 bytes railties/guides/images/has_one_through.png | Bin 92594 -> 0 bytes railties/guides/images/header_backdrop.png | Bin 882 -> 0 bytes railties/guides/images/header_tile.gif | Bin 44 -> 0 bytes .../guides/images/i18n/demo_localized_pirate.png | Bin 15027 -> 0 bytes railties/guides/images/i18n/demo_translated_en.png | Bin 12057 -> 0 bytes .../guides/images/i18n/demo_translated_pirate.png | Bin 13392 -> 0 bytes .../images/i18n/demo_translation_missing.png | Bin 13143 -> 0 bytes railties/guides/images/i18n/demo_untranslated.png | Bin 11925 -> 0 bytes railties/guides/images/icons/README | 5 - railties/guides/images/icons/callouts/1.png | Bin 329 -> 0 bytes railties/guides/images/icons/callouts/10.png | Bin 361 -> 0 bytes railties/guides/images/icons/callouts/11.png | Bin 565 -> 0 bytes railties/guides/images/icons/callouts/12.png | Bin 617 -> 0 bytes railties/guides/images/icons/callouts/13.png | Bin 623 -> 0 bytes railties/guides/images/icons/callouts/14.png | Bin 411 -> 0 bytes railties/guides/images/icons/callouts/15.png | Bin 640 -> 0 bytes railties/guides/images/icons/callouts/2.png | Bin 353 -> 0 bytes railties/guides/images/icons/callouts/3.png | Bin 350 -> 0 bytes railties/guides/images/icons/callouts/4.png | Bin 345 -> 0 bytes railties/guides/images/icons/callouts/5.png | Bin 348 -> 0 bytes railties/guides/images/icons/callouts/6.png | Bin 355 -> 0 bytes railties/guides/images/icons/callouts/7.png | Bin 344 -> 0 bytes railties/guides/images/icons/callouts/8.png | Bin 357 -> 0 bytes railties/guides/images/icons/callouts/9.png | Bin 357 -> 0 bytes railties/guides/images/icons/caution.png | Bin 2554 -> 0 bytes railties/guides/images/icons/example.png | Bin 2354 -> 0 bytes railties/guides/images/icons/home.png | Bin 1340 -> 0 bytes railties/guides/images/icons/important.png | Bin 2657 -> 0 bytes railties/guides/images/icons/next.png | Bin 1302 -> 0 bytes railties/guides/images/icons/note.png | Bin 2730 -> 0 bytes railties/guides/images/icons/prev.png | Bin 1348 -> 0 bytes railties/guides/images/icons/tip.png | Bin 2602 -> 0 bytes railties/guides/images/icons/up.png | Bin 1320 -> 0 bytes railties/guides/images/icons/warning.png | Bin 2828 -> 0 bytes railties/guides/images/nav_arrow.gif | Bin 427 -> 0 bytes railties/guides/images/polymorphic.png | Bin 85248 -> 0 bytes railties/guides/images/posts_index.png | Bin 60846 -> 0 bytes railties/guides/images/rails_guides_logo.gif | Bin 5114 -> 0 bytes railties/guides/images/rails_logo_remix.gif | Bin 8533 -> 0 bytes railties/guides/images/rails_welcome.png | Bin 106417 -> 0 bytes railties/guides/images/session_fixation.png | Bin 47860 -> 0 bytes railties/guides/images/tab_grey.gif | Bin 4924 -> 0 bytes railties/guides/images/tab_info.gif | Bin 4762 -> 0 bytes railties/guides/images/tab_note.gif | Bin 4807 -> 0 bytes railties/guides/images/tab_red.gif | Bin 4753 -> 0 bytes railties/guides/images/tab_yellow.gif | Bin 4759 -> 0 bytes railties/guides/images/tab_yellow.png | Bin 1611 -> 0 bytes .../guides/images/validation_error_messages.png | Bin 1107 -> 0 bytes railties/guides/rails_guides/generator.rb | 3 +- railties/guides/source/contribute.textile | 2 +- railties/guides/source/layout.html.erb | 12 +- 153 files changed, 889 insertions(+), 890 deletions(-) create mode 100644 railties/guides/assets/images/belongs_to.png create mode 100644 railties/guides/assets/images/book_icon.gif create mode 100644 railties/guides/assets/images/bullet.gif create mode 100644 railties/guides/assets/images/challenge.png create mode 100644 railties/guides/assets/images/chapters_icon.gif create mode 100644 railties/guides/assets/images/check_bullet.gif create mode 100644 railties/guides/assets/images/credits_pic_blank.gif create mode 100644 railties/guides/assets/images/csrf.png create mode 100644 railties/guides/assets/images/customized_error_messages.png create mode 100644 railties/guides/assets/images/edge_badge.png create mode 100644 railties/guides/assets/images/error_messages.png create mode 100644 railties/guides/assets/images/feature_tile.gif create mode 100644 railties/guides/assets/images/footer_tile.gif create mode 100644 railties/guides/assets/images/fxn.png create mode 100644 railties/guides/assets/images/grey_bullet.gif create mode 100644 railties/guides/assets/images/habtm.png create mode 100644 railties/guides/assets/images/has_many.png create mode 100644 railties/guides/assets/images/has_many_through.png create mode 100644 railties/guides/assets/images/has_one.png create mode 100644 railties/guides/assets/images/has_one_through.png create mode 100644 railties/guides/assets/images/header_backdrop.png create mode 100644 railties/guides/assets/images/header_tile.gif create mode 100644 railties/guides/assets/images/i18n/demo_localized_pirate.png create mode 100644 railties/guides/assets/images/i18n/demo_translated_en.png create mode 100644 railties/guides/assets/images/i18n/demo_translated_pirate.png create mode 100644 railties/guides/assets/images/i18n/demo_translation_missing.png create mode 100644 railties/guides/assets/images/i18n/demo_untranslated.png create mode 100644 railties/guides/assets/images/icons/README create mode 100644 railties/guides/assets/images/icons/callouts/1.png create mode 100644 railties/guides/assets/images/icons/callouts/10.png create mode 100644 railties/guides/assets/images/icons/callouts/11.png create mode 100644 railties/guides/assets/images/icons/callouts/12.png create mode 100644 railties/guides/assets/images/icons/callouts/13.png create mode 100644 railties/guides/assets/images/icons/callouts/14.png create mode 100644 railties/guides/assets/images/icons/callouts/15.png create mode 100644 railties/guides/assets/images/icons/callouts/2.png create mode 100644 railties/guides/assets/images/icons/callouts/3.png create mode 100644 railties/guides/assets/images/icons/callouts/4.png create mode 100644 railties/guides/assets/images/icons/callouts/5.png create mode 100644 railties/guides/assets/images/icons/callouts/6.png create mode 100644 railties/guides/assets/images/icons/callouts/7.png create mode 100644 railties/guides/assets/images/icons/callouts/8.png create mode 100644 railties/guides/assets/images/icons/callouts/9.png create mode 100644 railties/guides/assets/images/icons/caution.png create mode 100644 railties/guides/assets/images/icons/example.png create mode 100644 railties/guides/assets/images/icons/home.png create mode 100644 railties/guides/assets/images/icons/important.png create mode 100644 railties/guides/assets/images/icons/next.png create mode 100644 railties/guides/assets/images/icons/note.png create mode 100644 railties/guides/assets/images/icons/prev.png create mode 100644 railties/guides/assets/images/icons/tip.png create mode 100644 railties/guides/assets/images/icons/up.png create mode 100644 railties/guides/assets/images/icons/warning.png create mode 100644 railties/guides/assets/images/nav_arrow.gif create mode 100644 railties/guides/assets/images/polymorphic.png create mode 100644 railties/guides/assets/images/posts_index.png create mode 100644 railties/guides/assets/images/rails_guides_logo.gif create mode 100644 railties/guides/assets/images/rails_logo_remix.gif create mode 100644 railties/guides/assets/images/rails_welcome.png create mode 100644 railties/guides/assets/images/session_fixation.png create mode 100644 railties/guides/assets/images/tab_grey.gif create mode 100644 railties/guides/assets/images/tab_info.gif create mode 100644 railties/guides/assets/images/tab_note.gif create mode 100644 railties/guides/assets/images/tab_red.gif create mode 100644 railties/guides/assets/images/tab_yellow.gif create mode 100644 railties/guides/assets/images/tab_yellow.png create mode 100644 railties/guides/assets/images/validation_error_messages.png create mode 100755 railties/guides/assets/javascripts/code_highlighter.js create mode 100755 railties/guides/assets/javascripts/guides.js create mode 100644 railties/guides/assets/javascripts/highlighters.js create mode 100644 railties/guides/assets/stylesheets/main.css create mode 100755 railties/guides/assets/stylesheets/print.css create mode 100755 railties/guides/assets/stylesheets/reset.css create mode 100755 railties/guides/assets/stylesheets/style.css create mode 100644 railties/guides/assets/stylesheets/syntax.css delete mode 100755 railties/guides/files/javascripts/code_highlighter.js delete mode 100755 railties/guides/files/javascripts/guides.js delete mode 100644 railties/guides/files/javascripts/highlighters.js delete mode 100644 railties/guides/files/stylesheets/main.css delete mode 100755 railties/guides/files/stylesheets/print.css delete mode 100755 railties/guides/files/stylesheets/reset.css delete mode 100755 railties/guides/files/stylesheets/style.css delete mode 100644 railties/guides/files/stylesheets/syntax.css delete mode 100644 railties/guides/images/belongs_to.png delete mode 100644 railties/guides/images/book_icon.gif delete mode 100644 railties/guides/images/bullet.gif delete mode 100644 railties/guides/images/challenge.png delete mode 100644 railties/guides/images/chapters_icon.gif delete mode 100644 railties/guides/images/check_bullet.gif delete mode 100644 railties/guides/images/credits_pic_blank.gif delete mode 100644 railties/guides/images/csrf.png delete mode 100644 railties/guides/images/customized_error_messages.png delete mode 100644 railties/guides/images/edge_badge.png delete mode 100644 railties/guides/images/error_messages.png delete mode 100644 railties/guides/images/feature_tile.gif delete mode 100644 railties/guides/images/footer_tile.gif delete mode 100644 railties/guides/images/fxn.png delete mode 100644 railties/guides/images/grey_bullet.gif delete mode 100644 railties/guides/images/habtm.png delete mode 100644 railties/guides/images/has_many.png delete mode 100644 railties/guides/images/has_many_through.png delete mode 100644 railties/guides/images/has_one.png delete mode 100644 railties/guides/images/has_one_through.png delete mode 100644 railties/guides/images/header_backdrop.png delete mode 100644 railties/guides/images/header_tile.gif delete mode 100644 railties/guides/images/i18n/demo_localized_pirate.png delete mode 100644 railties/guides/images/i18n/demo_translated_en.png delete mode 100644 railties/guides/images/i18n/demo_translated_pirate.png delete mode 100644 railties/guides/images/i18n/demo_translation_missing.png delete mode 100644 railties/guides/images/i18n/demo_untranslated.png delete mode 100644 railties/guides/images/icons/README delete mode 100644 railties/guides/images/icons/callouts/1.png delete mode 100644 railties/guides/images/icons/callouts/10.png delete mode 100644 railties/guides/images/icons/callouts/11.png delete mode 100644 railties/guides/images/icons/callouts/12.png delete mode 100644 railties/guides/images/icons/callouts/13.png delete mode 100644 railties/guides/images/icons/callouts/14.png delete mode 100644 railties/guides/images/icons/callouts/15.png delete mode 100644 railties/guides/images/icons/callouts/2.png delete mode 100644 railties/guides/images/icons/callouts/3.png delete mode 100644 railties/guides/images/icons/callouts/4.png delete mode 100644 railties/guides/images/icons/callouts/5.png delete mode 100644 railties/guides/images/icons/callouts/6.png delete mode 100644 railties/guides/images/icons/callouts/7.png delete mode 100644 railties/guides/images/icons/callouts/8.png delete mode 100644 railties/guides/images/icons/callouts/9.png delete mode 100644 railties/guides/images/icons/caution.png delete mode 100644 railties/guides/images/icons/example.png delete mode 100644 railties/guides/images/icons/home.png delete mode 100644 railties/guides/images/icons/important.png delete mode 100644 railties/guides/images/icons/next.png delete mode 100644 railties/guides/images/icons/note.png delete mode 100644 railties/guides/images/icons/prev.png delete mode 100644 railties/guides/images/icons/tip.png delete mode 100644 railties/guides/images/icons/up.png delete mode 100644 railties/guides/images/icons/warning.png delete mode 100644 railties/guides/images/nav_arrow.gif delete mode 100644 railties/guides/images/polymorphic.png delete mode 100644 railties/guides/images/posts_index.png delete mode 100644 railties/guides/images/rails_guides_logo.gif delete mode 100644 railties/guides/images/rails_logo_remix.gif delete mode 100644 railties/guides/images/rails_welcome.png delete mode 100644 railties/guides/images/session_fixation.png delete mode 100644 railties/guides/images/tab_grey.gif delete mode 100644 railties/guides/images/tab_info.gif delete mode 100644 railties/guides/images/tab_note.gif delete mode 100644 railties/guides/images/tab_red.gif delete mode 100644 railties/guides/images/tab_yellow.gif delete mode 100644 railties/guides/images/tab_yellow.png delete mode 100644 railties/guides/images/validation_error_messages.png diff --git a/railties/guides/assets/images/belongs_to.png b/railties/guides/assets/images/belongs_to.png new file mode 100644 index 0000000000..44243edbca Binary files /dev/null and b/railties/guides/assets/images/belongs_to.png differ diff --git a/railties/guides/assets/images/book_icon.gif b/railties/guides/assets/images/book_icon.gif new file mode 100644 index 0000000000..c81d5db520 Binary files /dev/null and b/railties/guides/assets/images/book_icon.gif differ diff --git a/railties/guides/assets/images/bullet.gif b/railties/guides/assets/images/bullet.gif new file mode 100644 index 0000000000..95a26364a4 Binary files /dev/null and b/railties/guides/assets/images/bullet.gif differ diff --git a/railties/guides/assets/images/challenge.png b/railties/guides/assets/images/challenge.png new file mode 100644 index 0000000000..d163748640 Binary files /dev/null and b/railties/guides/assets/images/challenge.png differ diff --git a/railties/guides/assets/images/chapters_icon.gif b/railties/guides/assets/images/chapters_icon.gif new file mode 100644 index 0000000000..06fb415f4a Binary files /dev/null and b/railties/guides/assets/images/chapters_icon.gif differ diff --git a/railties/guides/assets/images/check_bullet.gif b/railties/guides/assets/images/check_bullet.gif new file mode 100644 index 0000000000..1fcfeba250 Binary files /dev/null and b/railties/guides/assets/images/check_bullet.gif differ diff --git a/railties/guides/assets/images/credits_pic_blank.gif b/railties/guides/assets/images/credits_pic_blank.gif new file mode 100644 index 0000000000..f6f654fc65 Binary files /dev/null and b/railties/guides/assets/images/credits_pic_blank.gif differ diff --git a/railties/guides/assets/images/csrf.png b/railties/guides/assets/images/csrf.png new file mode 100644 index 0000000000..ab73baafe8 Binary files /dev/null and b/railties/guides/assets/images/csrf.png differ diff --git a/railties/guides/assets/images/customized_error_messages.png b/railties/guides/assets/images/customized_error_messages.png new file mode 100644 index 0000000000..fa676991e3 Binary files /dev/null and b/railties/guides/assets/images/customized_error_messages.png differ diff --git a/railties/guides/assets/images/edge_badge.png b/railties/guides/assets/images/edge_badge.png new file mode 100644 index 0000000000..cddd46c4b8 Binary files /dev/null and b/railties/guides/assets/images/edge_badge.png differ diff --git a/railties/guides/assets/images/error_messages.png b/railties/guides/assets/images/error_messages.png new file mode 100644 index 0000000000..428892194a Binary files /dev/null and b/railties/guides/assets/images/error_messages.png differ diff --git a/railties/guides/assets/images/feature_tile.gif b/railties/guides/assets/images/feature_tile.gif new file mode 100644 index 0000000000..75469361db Binary files /dev/null and b/railties/guides/assets/images/feature_tile.gif differ diff --git a/railties/guides/assets/images/footer_tile.gif b/railties/guides/assets/images/footer_tile.gif new file mode 100644 index 0000000000..bb33fc1ff0 Binary files /dev/null and b/railties/guides/assets/images/footer_tile.gif differ diff --git a/railties/guides/assets/images/fxn.png b/railties/guides/assets/images/fxn.png new file mode 100644 index 0000000000..9b531ee584 Binary files /dev/null and b/railties/guides/assets/images/fxn.png differ diff --git a/railties/guides/assets/images/grey_bullet.gif b/railties/guides/assets/images/grey_bullet.gif new file mode 100644 index 0000000000..e75e8e93a1 Binary files /dev/null and b/railties/guides/assets/images/grey_bullet.gif differ diff --git a/railties/guides/assets/images/habtm.png b/railties/guides/assets/images/habtm.png new file mode 100644 index 0000000000..fea78b0b5c Binary files /dev/null and b/railties/guides/assets/images/habtm.png differ diff --git a/railties/guides/assets/images/has_many.png b/railties/guides/assets/images/has_many.png new file mode 100644 index 0000000000..6cff58460d Binary files /dev/null and b/railties/guides/assets/images/has_many.png differ diff --git a/railties/guides/assets/images/has_many_through.png b/railties/guides/assets/images/has_many_through.png new file mode 100644 index 0000000000..85d7599925 Binary files /dev/null and b/railties/guides/assets/images/has_many_through.png differ diff --git a/railties/guides/assets/images/has_one.png b/railties/guides/assets/images/has_one.png new file mode 100644 index 0000000000..a70ddaaa86 Binary files /dev/null and b/railties/guides/assets/images/has_one.png differ diff --git a/railties/guides/assets/images/has_one_through.png b/railties/guides/assets/images/has_one_through.png new file mode 100644 index 0000000000..89a7617a30 Binary files /dev/null and b/railties/guides/assets/images/has_one_through.png differ diff --git a/railties/guides/assets/images/header_backdrop.png b/railties/guides/assets/images/header_backdrop.png new file mode 100644 index 0000000000..ff2982175e Binary files /dev/null and b/railties/guides/assets/images/header_backdrop.png differ diff --git a/railties/guides/assets/images/header_tile.gif b/railties/guides/assets/images/header_tile.gif new file mode 100644 index 0000000000..e2c878d492 Binary files /dev/null and b/railties/guides/assets/images/header_tile.gif differ diff --git a/railties/guides/assets/images/i18n/demo_localized_pirate.png b/railties/guides/assets/images/i18n/demo_localized_pirate.png new file mode 100644 index 0000000000..9134709573 Binary files /dev/null and b/railties/guides/assets/images/i18n/demo_localized_pirate.png differ diff --git a/railties/guides/assets/images/i18n/demo_translated_en.png b/railties/guides/assets/images/i18n/demo_translated_en.png new file mode 100644 index 0000000000..ecdd878d38 Binary files /dev/null and b/railties/guides/assets/images/i18n/demo_translated_en.png differ diff --git a/railties/guides/assets/images/i18n/demo_translated_pirate.png b/railties/guides/assets/images/i18n/demo_translated_pirate.png new file mode 100644 index 0000000000..41c580923a Binary files /dev/null and b/railties/guides/assets/images/i18n/demo_translated_pirate.png differ diff --git a/railties/guides/assets/images/i18n/demo_translation_missing.png b/railties/guides/assets/images/i18n/demo_translation_missing.png new file mode 100644 index 0000000000..af9e2d0427 Binary files /dev/null and b/railties/guides/assets/images/i18n/demo_translation_missing.png differ diff --git a/railties/guides/assets/images/i18n/demo_untranslated.png b/railties/guides/assets/images/i18n/demo_untranslated.png new file mode 100644 index 0000000000..3603f43463 Binary files /dev/null and b/railties/guides/assets/images/i18n/demo_untranslated.png differ diff --git a/railties/guides/assets/images/icons/README b/railties/guides/assets/images/icons/README new file mode 100644 index 0000000000..f12b2a730c --- /dev/null +++ b/railties/guides/assets/images/icons/README @@ -0,0 +1,5 @@ +Replaced the plain DocBook XSL admonition icons with Jimmac's DocBook +icons (http://jimmac.musichall.cz/ikony.php3). I dropped transparency +from the Jimmac icons to get round MS IE and FOP PNG incompatibilies. + +Stuart Rackham diff --git a/railties/guides/assets/images/icons/callouts/1.png b/railties/guides/assets/images/icons/callouts/1.png new file mode 100644 index 0000000000..7d473430b7 Binary files /dev/null and b/railties/guides/assets/images/icons/callouts/1.png differ diff --git a/railties/guides/assets/images/icons/callouts/10.png b/railties/guides/assets/images/icons/callouts/10.png new file mode 100644 index 0000000000..997bbc8246 Binary files /dev/null and b/railties/guides/assets/images/icons/callouts/10.png differ diff --git a/railties/guides/assets/images/icons/callouts/11.png b/railties/guides/assets/images/icons/callouts/11.png new file mode 100644 index 0000000000..ce47dac3f5 Binary files /dev/null and b/railties/guides/assets/images/icons/callouts/11.png differ diff --git a/railties/guides/assets/images/icons/callouts/12.png b/railties/guides/assets/images/icons/callouts/12.png new file mode 100644 index 0000000000..31daf4e2f2 Binary files /dev/null and b/railties/guides/assets/images/icons/callouts/12.png differ diff --git a/railties/guides/assets/images/icons/callouts/13.png b/railties/guides/assets/images/icons/callouts/13.png new file mode 100644 index 0000000000..14021a89c2 Binary files /dev/null and b/railties/guides/assets/images/icons/callouts/13.png differ diff --git a/railties/guides/assets/images/icons/callouts/14.png b/railties/guides/assets/images/icons/callouts/14.png new file mode 100644 index 0000000000..64014b75fe Binary files /dev/null and b/railties/guides/assets/images/icons/callouts/14.png differ diff --git a/railties/guides/assets/images/icons/callouts/15.png b/railties/guides/assets/images/icons/callouts/15.png new file mode 100644 index 0000000000..0d65765fcf Binary files /dev/null and b/railties/guides/assets/images/icons/callouts/15.png differ diff --git a/railties/guides/assets/images/icons/callouts/2.png b/railties/guides/assets/images/icons/callouts/2.png new file mode 100644 index 0000000000..5d09341b2f Binary files /dev/null and b/railties/guides/assets/images/icons/callouts/2.png differ diff --git a/railties/guides/assets/images/icons/callouts/3.png b/railties/guides/assets/images/icons/callouts/3.png new file mode 100644 index 0000000000..ef7b700471 Binary files /dev/null and b/railties/guides/assets/images/icons/callouts/3.png differ diff --git a/railties/guides/assets/images/icons/callouts/4.png b/railties/guides/assets/images/icons/callouts/4.png new file mode 100644 index 0000000000..adb8364eb5 Binary files /dev/null and b/railties/guides/assets/images/icons/callouts/4.png differ diff --git a/railties/guides/assets/images/icons/callouts/5.png b/railties/guides/assets/images/icons/callouts/5.png new file mode 100644 index 0000000000..4d7eb46002 Binary files /dev/null and b/railties/guides/assets/images/icons/callouts/5.png differ diff --git a/railties/guides/assets/images/icons/callouts/6.png b/railties/guides/assets/images/icons/callouts/6.png new file mode 100644 index 0000000000..0ba694af6c Binary files /dev/null and b/railties/guides/assets/images/icons/callouts/6.png differ diff --git a/railties/guides/assets/images/icons/callouts/7.png b/railties/guides/assets/images/icons/callouts/7.png new file mode 100644 index 0000000000..472e96f8ac Binary files /dev/null and b/railties/guides/assets/images/icons/callouts/7.png differ diff --git a/railties/guides/assets/images/icons/callouts/8.png b/railties/guides/assets/images/icons/callouts/8.png new file mode 100644 index 0000000000..5e60973c21 Binary files /dev/null and b/railties/guides/assets/images/icons/callouts/8.png differ diff --git a/railties/guides/assets/images/icons/callouts/9.png b/railties/guides/assets/images/icons/callouts/9.png new file mode 100644 index 0000000000..a0676d26cc Binary files /dev/null and b/railties/guides/assets/images/icons/callouts/9.png differ diff --git a/railties/guides/assets/images/icons/caution.png b/railties/guides/assets/images/icons/caution.png new file mode 100644 index 0000000000..cb9d5ea0df Binary files /dev/null and b/railties/guides/assets/images/icons/caution.png differ diff --git a/railties/guides/assets/images/icons/example.png b/railties/guides/assets/images/icons/example.png new file mode 100644 index 0000000000..bba1c0010d Binary files /dev/null and b/railties/guides/assets/images/icons/example.png differ diff --git a/railties/guides/assets/images/icons/home.png b/railties/guides/assets/images/icons/home.png new file mode 100644 index 0000000000..37a5231bac Binary files /dev/null and b/railties/guides/assets/images/icons/home.png differ diff --git a/railties/guides/assets/images/icons/important.png b/railties/guides/assets/images/icons/important.png new file mode 100644 index 0000000000..1096c23295 Binary files /dev/null and b/railties/guides/assets/images/icons/important.png differ diff --git a/railties/guides/assets/images/icons/next.png b/railties/guides/assets/images/icons/next.png new file mode 100644 index 0000000000..64e126bdda Binary files /dev/null and b/railties/guides/assets/images/icons/next.png differ diff --git a/railties/guides/assets/images/icons/note.png b/railties/guides/assets/images/icons/note.png new file mode 100644 index 0000000000..841820f7c4 Binary files /dev/null and b/railties/guides/assets/images/icons/note.png differ diff --git a/railties/guides/assets/images/icons/prev.png b/railties/guides/assets/images/icons/prev.png new file mode 100644 index 0000000000..3e8f12fe24 Binary files /dev/null and b/railties/guides/assets/images/icons/prev.png differ diff --git a/railties/guides/assets/images/icons/tip.png b/railties/guides/assets/images/icons/tip.png new file mode 100644 index 0000000000..a3a029d898 Binary files /dev/null and b/railties/guides/assets/images/icons/tip.png differ diff --git a/railties/guides/assets/images/icons/up.png b/railties/guides/assets/images/icons/up.png new file mode 100644 index 0000000000..2db1ce62fa Binary files /dev/null and b/railties/guides/assets/images/icons/up.png differ diff --git a/railties/guides/assets/images/icons/warning.png b/railties/guides/assets/images/icons/warning.png new file mode 100644 index 0000000000..0b0c419df2 Binary files /dev/null and b/railties/guides/assets/images/icons/warning.png differ diff --git a/railties/guides/assets/images/nav_arrow.gif b/railties/guides/assets/images/nav_arrow.gif new file mode 100644 index 0000000000..c4f57658d7 Binary files /dev/null and b/railties/guides/assets/images/nav_arrow.gif differ diff --git a/railties/guides/assets/images/polymorphic.png b/railties/guides/assets/images/polymorphic.png new file mode 100644 index 0000000000..ff2fd9f76d Binary files /dev/null and b/railties/guides/assets/images/polymorphic.png differ diff --git a/railties/guides/assets/images/posts_index.png b/railties/guides/assets/images/posts_index.png new file mode 100644 index 0000000000..f6cd2f9b80 Binary files /dev/null and b/railties/guides/assets/images/posts_index.png differ diff --git a/railties/guides/assets/images/rails_guides_logo.gif b/railties/guides/assets/images/rails_guides_logo.gif new file mode 100644 index 0000000000..a24683a34e Binary files /dev/null and b/railties/guides/assets/images/rails_guides_logo.gif differ diff --git a/railties/guides/assets/images/rails_logo_remix.gif b/railties/guides/assets/images/rails_logo_remix.gif new file mode 100644 index 0000000000..58960ee4f9 Binary files /dev/null and b/railties/guides/assets/images/rails_logo_remix.gif differ diff --git a/railties/guides/assets/images/rails_welcome.png b/railties/guides/assets/images/rails_welcome.png new file mode 100644 index 0000000000..0e02cf5a8c Binary files /dev/null and b/railties/guides/assets/images/rails_welcome.png differ diff --git a/railties/guides/assets/images/session_fixation.png b/railties/guides/assets/images/session_fixation.png new file mode 100644 index 0000000000..6b084508db Binary files /dev/null and b/railties/guides/assets/images/session_fixation.png differ diff --git a/railties/guides/assets/images/tab_grey.gif b/railties/guides/assets/images/tab_grey.gif new file mode 100644 index 0000000000..e9680b7136 Binary files /dev/null and b/railties/guides/assets/images/tab_grey.gif differ diff --git a/railties/guides/assets/images/tab_info.gif b/railties/guides/assets/images/tab_info.gif new file mode 100644 index 0000000000..458fea9a61 Binary files /dev/null and b/railties/guides/assets/images/tab_info.gif differ diff --git a/railties/guides/assets/images/tab_note.gif b/railties/guides/assets/images/tab_note.gif new file mode 100644 index 0000000000..1d5c171ed6 Binary files /dev/null and b/railties/guides/assets/images/tab_note.gif differ diff --git a/railties/guides/assets/images/tab_red.gif b/railties/guides/assets/images/tab_red.gif new file mode 100644 index 0000000000..daf140b5a8 Binary files /dev/null and b/railties/guides/assets/images/tab_red.gif differ diff --git a/railties/guides/assets/images/tab_yellow.gif b/railties/guides/assets/images/tab_yellow.gif new file mode 100644 index 0000000000..dc961c99dd Binary files /dev/null and b/railties/guides/assets/images/tab_yellow.gif differ diff --git a/railties/guides/assets/images/tab_yellow.png b/railties/guides/assets/images/tab_yellow.png new file mode 100644 index 0000000000..cceea6581f Binary files /dev/null and b/railties/guides/assets/images/tab_yellow.png differ diff --git a/railties/guides/assets/images/validation_error_messages.png b/railties/guides/assets/images/validation_error_messages.png new file mode 100644 index 0000000000..622d35da5d Binary files /dev/null and b/railties/guides/assets/images/validation_error_messages.png differ diff --git a/railties/guides/assets/javascripts/code_highlighter.js b/railties/guides/assets/javascripts/code_highlighter.js new file mode 100755 index 0000000000..ce983dad52 --- /dev/null +++ b/railties/guides/assets/javascripts/code_highlighter.js @@ -0,0 +1,188 @@ +/* Unobtrustive Code Highlighter By Dan Webb 11/2005 + Version: 0.4 + + Usage: + Add a script tag for this script and any stylesets you need to use + to the page in question, add correct class names to CODE elements, + define CSS styles for elements. That's it! + + Known to work on: + IE 5.5+ PC + Firefox/Mozilla PC/Mac + Opera 7.23 + PC + Safari 2 + + Known to degrade gracefully on: + IE5.0 PC + + Note: IE5.0 fails due to the use of lookahead in some stylesets. To avoid script errors + in older browsers use expressions that use lookahead in string format when defining stylesets. + + This script is inspired by star-light by entirely cunning Dean Edwards + http://dean.edwards.name/star-light/. +*/ + +// replace callback support for safari. +if ("a".replace(/a/, function() {return "b"}) != "b") (function(){ + var default_replace = String.prototype.replace; + String.prototype.replace = function(search,replace){ + // replace is not function + if(typeof replace != "function"){ + return default_replace.apply(this,arguments) + } + var str = "" + this; + var callback = replace; + // search string is not RegExp + if(!(search instanceof RegExp)){ + var idx = str.indexOf(search); + return ( + idx == -1 ? str : + default_replace.apply(str,[search,callback(search, idx, str)]) + ) + } + var reg = search; + var result = []; + var lastidx = reg.lastIndex; + var re; + while((re = reg.exec(str)) != null){ + var idx = re.index; + var args = re.concat(idx, str); + result.push( + str.slice(lastidx,idx), + callback.apply(null,args).toString() + ); + if(!reg.global){ + lastidx += RegExp.lastMatch.length; + break + }else{ + lastidx = reg.lastIndex; + } + } + result.push(str.slice(lastidx)); + return result.join("") + } +})(); + +var CodeHighlighter = { styleSets : new Array }; + +CodeHighlighter.addStyle = function(name, rules) { + // using push test to disallow older browsers from adding styleSets + if ([].push) this.styleSets.push({ + name : name, + rules : rules, + ignoreCase : arguments[2] || false + }) + + function setEvent() { + // set highlighter to run on load (use LowPro if present) + if (typeof Event != 'undefined' && typeof Event.onReady == 'function') + return Event.onReady(CodeHighlighter.init.bind(CodeHighlighter)); + + var old = window.onload; + + if (typeof window.onload != 'function') { + window.onload = function() { CodeHighlighter.init() }; + } else { + window.onload = function() { + old(); + CodeHighlighter.init(); + } + } + } + + // only set the event when the first style is added + if (this.styleSets.length==1) setEvent(); +} + +CodeHighlighter.init = function() { + if (!document.getElementsByTagName) return; + if ("a".replace(/a/, function() {return "b"}) != "b") return; // throw out Safari versions that don't support replace function + // throw out older browsers + + var codeEls = document.getElementsByTagName("CODE"); + // collect array of all pre elements + codeEls.filter = function(f) { + var a = new Array; + for (var i = 0; i < this.length; i++) if (f(this[i])) a[a.length] = this[i]; + return a; + } + + var rules = new Array; + rules.toString = function() { + // joins regexes into one big parallel regex + var exps = new Array; + for (var i = 0; i < this.length; i++) exps.push(this[i].exp); + return exps.join("|"); + } + + function addRule(className, rule) { + // add a replace rule + var exp = (typeof rule.exp != "string")?String(rule.exp).substr(1, String(rule.exp).length-2):rule.exp; + // converts regex rules to strings and chops of the slashes + rules.push({ + className : className, + exp : "(" + exp + ")", + length : (exp.match(/(^|[^\\])\([^?]/g) || "").length + 1, // number of subexps in rule + replacement : rule.replacement || null + }); + } + + function parse(text, ignoreCase) { + // main text parsing and replacement + return text.replace(new RegExp(rules, (ignoreCase)?"gi":"g"), function() { + var i = 0, j = 1, rule; + while (rule = rules[i++]) { + if (arguments[j]) { + // if no custom replacement defined do the simple replacement + if (!rule.replacement) return "" + arguments[0] + ""; + else { + // replace $0 with the className then do normal replaces + var str = rule.replacement.replace("$0", rule.className); + for (var k = 1; k <= rule.length - 1; k++) str = str.replace("$" + k, arguments[j + k]); + return str; + } + } else j+= rule.length; + } + }); + } + + function highlightCode(styleSet) { + // clear rules array + var parsed, clsRx = new RegExp("(\\s|^)" + styleSet.name + "(\\s|$)"); + rules.length = 0; + + // get stylable elements by filtering out all code elements without the correct className + var stylableEls = codeEls.filter(function(item) { return clsRx.test(item.className) }); + + // add style rules to parser + for (var className in styleSet.rules) addRule(className, styleSet.rules[className]); + + + // replace for all elements + for (var i = 0; i < stylableEls.length; i++) { + // EVIL hack to fix IE whitespace badness if it's inside a

+			if (/MSIE/.test(navigator.appVersion) && stylableEls[i].parentNode.nodeName == 'PRE') {
+				stylableEls[i] = stylableEls[i].parentNode;
+
+				parsed = stylableEls[i].innerHTML.replace(/(]*>)([^<]*)<\/code>/i, function() {
+					return arguments[1] + parse(arguments[2], styleSet.ignoreCase) + ""
+				});
+				parsed = parsed.replace(/\n( *)/g, function() {
+					var spaces = "";
+					for (var i = 0; i < arguments[1].length; i++) spaces+= " ";
+					return "\n" + spaces;
+				});
+				parsed = parsed.replace(/\t/g, "    ");
+				parsed = parsed.replace(/\n(<\/\w+>)?/g, "
$1").replace(/
[\n\r\s]*
/g, "


"); + + } else parsed = parse(stylableEls[i].innerHTML, styleSet.ignoreCase); + + stylableEls[i].innerHTML = parsed; + } + } + + // run highlighter on all stylesets + for (var i=0; i < this.styleSets.length; i++) { + highlightCode(this.styleSets[i]); + } +} diff --git a/railties/guides/assets/javascripts/guides.js b/railties/guides/assets/javascripts/guides.js new file mode 100755 index 0000000000..c4e4d459ea --- /dev/null +++ b/railties/guides/assets/javascripts/guides.js @@ -0,0 +1,7 @@ +function guideMenu(){ + if (document.getElementById('guides').style.display == "none") { + document.getElementById('guides').style.display = "block"; + } else { + document.getElementById('guides').style.display = "none"; + } +} diff --git a/railties/guides/assets/javascripts/highlighters.js b/railties/guides/assets/javascripts/highlighters.js new file mode 100644 index 0000000000..4f5f0779d7 --- /dev/null +++ b/railties/guides/assets/javascripts/highlighters.js @@ -0,0 +1,90 @@ +CodeHighlighter.addStyle("css", { + comment : { + exp : /\/\*[^*]*\*+([^\/][^*]*\*+)*\// + }, + keywords : { + exp : /@\w[\w\s]*/ + }, + selectors : { + exp : "([\\w-:\\[.#][^{};>]*)(?={)" + }, + properties : { + exp : "([\\w-]+)(?=\\s*:)" + }, + units : { + exp : /([0-9])(em|en|px|%|pt)\b/, + replacement : "$1$2" + }, + urls : { + exp : /url\([^\)]*\)/ + } + }); + +CodeHighlighter.addStyle("ruby",{ + comment : { + exp : /#[^\n]+/ + }, + brackets : { + exp : /\(|\)/ + }, + string : { + exp : /'[^']*'|"[^"]*"/ + }, + keywords : { + exp : /\b(do|end|self|class|def|if|module|yield|then|else|for|until|unless|while|elsif|case|when|break|retry|redo|rescue|require|raise)\b/ + }, + /* Added by Shelly Fisher (shelly@agileevolved.com) */ + symbol : { + exp : /([^:])(:[A-Za-z0-9_!?]+)/ + }, + ivar : { + exp : /\@[A-Za-z0-9_!?]+/ + } +}); + +CodeHighlighter.addStyle("html", { + comment : { + exp: /<!\s*(--([^-]|[\r\n]|-[^-])*--\s*)>/ + }, + tag : { + exp: /(<\/?)([a-zA-Z1-9]+\s?)/, + replacement: "$1$2" + }, + string : { + exp : /'[^']*'|"[^"]*"/ + }, + attribute : { + exp: /\b([a-zA-Z-:]+)(=)/, + replacement: "$1$2" + }, + doctype : { + exp: /<!DOCTYPE([^&]|&[^g]|&g[^t])*>/ + } +}); + +CodeHighlighter.addStyle("javascript",{ + comment : { + exp : /(\/\/[^\n]*(\n|$))|(\/\*[^*]*\*+([^\/][^*]*\*+)*\/)/ + }, + brackets : { + exp : /\(|\)/ + }, + string : { + exp : /'[^']*'|"[^"]*"/ + }, + keywords : { + exp : /\b(arguments|break|case|continue|default|delete|do|else|false|for|function|if|in|instanceof|new|null|return|switch|this|true|typeof|var|void|while|with)\b/ + }, + global : { + exp : /\b(toString|valueOf|window|element|prototype|constructor|document|escape|unescape|parseInt|parseFloat|setTimeout|clearTimeout|setInterval|clearInterval|NaN|isNaN|Infinity)\b/ + } +}); + +CodeHighlighter.addStyle("yaml", { + keyword : { + exp : /\/\*[^*]*\*+([^\/][^*]*\*+)*\// + }, + value : { + exp : /@\w[\w\s]*/ + }, +}); diff --git a/railties/guides/assets/stylesheets/main.css b/railties/guides/assets/stylesheets/main.css new file mode 100644 index 0000000000..7ccae2c87e --- /dev/null +++ b/railties/guides/assets/stylesheets/main.css @@ -0,0 +1,452 @@ +/* Guides.rubyonrails.org */ +/* Main.css */ +/* Created January 30, 2009 */ +/* Modified February 8, 2009 +--------------------------------------- */ + +/* General +--------------------------------------- */ + +.left {float: left; margin-right: 1em;} +.right {float: right; margin-left: 1em;} +.small {font-size: smaller;} +.large {font-size: larger;} +.hide {display: none;} + +li ul, li ol { margin:0 1.5em; } +ul, ol { margin: 0 1.5em 1.5em 1.5em; } + +ul { list-style-type: disc; } +ol { list-style-type: decimal; } + +dl { margin: 0 0 1.5em 0; } +dl dt { font-weight: bold; } +dd { margin-left: 1.5em;} + +pre,code { margin: 1.5em 0; white-space: pre; overflow: auto; } +pre,code,tt { font: 1em 'andale mono', 'lucida console', monospace; line-height: 1.5; } + +abbr, acronym { border-bottom: 1px dotted #666; } +address { margin: 0 0 1.5em; font-style: italic; } +del { color:#666; } + +blockquote { margin: 1.5em; color: #666; font-style: italic; } +strong { font-weight: bold; } +em, dfn { font-style: italic; } +dfn { font-weight: bold; } +sup, sub { line-height: 0; } +p {margin: 0 0 1.5em;} + +label { font-weight: bold; } +fieldset { padding:1.4em; margin: 0 0 1.5em 0; border: 1px solid #ccc; } +legend { font-weight: bold; font-size:1.2em; } + +input.text, input.title, +textarea, select { + margin:0.5em 0; + border:1px solid #bbb; +} + +table { + margin: 0 0 1.5em; + border: 2px solid #CCC; + background: #FFF; + border-collapse: collapse; +} + +table th, table td { + padding: 0.25em 1em; + border: 1px solid #CCC; + border-collapse: collapse; +} + +table th { + border-bottom: 2px solid #CCC; + background: #EEE; + font-weight: bold; + padding: 0.5em 1em; +} + + +/* Structure and Layout +--------------------------------------- */ + +body { + text-align: center; + font-family: Helvetica, Arial, sans-serif; + font-size: 87.5%; + line-height: 1.5em; + background: #222; + color: #999; + } + +.wrapper { + text-align: left; + margin: 0 auto; + width: 69em; + } + +#topNav { + padding: 1em 0; + color: #565656; +} + +#header { + background: #c52f24 url(../images/header_tile.gif) repeat-x; + color: #FFF; + padding: 1.5em 0; + position: relative; + z-index: 99; + } + +#feature { + background: #d5e9f6 url(../images/feature_tile.gif) repeat-x; + color: #333; + padding: 0.5em 0 1.5em; +} + +#container { + background: #FFF; + color: #333; + padding: 0.5em 0 1.5em 0; + } + +#mainCol { + width: 45em; + margin-left: 2em; + } + +#subCol { + position: absolute; + z-index: 0; + top: 0; + right: 0; + background: #FFF; + padding: 1em 1.5em 1em 1.25em; + width: 17em; + font-size: 0.9285em; + line-height: 1.3846em; + } + +#extraCol {display: none;} + +#footer { + padding: 2em 0; + background: url(../images/footer_tile.gif) repeat-x; + } +#footer .wrapper { + padding-left: 2em; + width: 67em; +} + +#header .wrapper, #topNav .wrapper, #feature .wrapper {padding-left: 1em; width: 68em;} +#feature .wrapper {width: 45em; padding-right: 23em; position: relative; z-index: 0;} + +/* Links +--------------------------------------- */ + +a, a:link, a:visited { + color: #ee3f3f; + text-decoration: underline; + } + +#mainCol a, #subCol a, #feature a {color: #980905;} + + +/* Navigation +--------------------------------------- */ + +.nav {margin: 0; padding: 0;} +.nav li {display: inline; list-style: none;} + +#header .nav { + float: right; + margin-top: 1.5em; + font-size: 1.2857em; +} + +#header .nav li {margin: 0 0 0 0.5em;} +#header .nav a {color: #FFF; text-decoration: none;} +#header .nav a:hover {text-decoration: underline;} + +#header .nav .index { + padding: 0.5em 1.5em; + border-radius: 1em; + -webkit-border-radius: 1em; + -moz-border-radius: 1em; + background: #980905; + position: relative; +} + +#header .nav .index a { + background: #980905 url(../images/nav_arrow.gif) no-repeat right top; + padding-right: 1em; + position: relative; + z-index: 15; + padding-bottom: 0.125em; +} +#header .nav .index:hover a, #header .nav .index a:hover {background-position: right -81px;} + +#guides { + width: 27em; + display: block; + background: #980905; + border-radius: 1em; + -webkit-border-radius: 1em; + -moz-border-radius: 1em; + -webkit-box-shadow: 0.25em 0.25em 1em rgba(0,0,0,0.25); + -moz-box-shadow: rgba(0,0,0,0.25) 0.25em 0.25em 1em; + color: #f1938c; + padding: 1.5em 2em; + position: absolute; + z-index: 10; + top: -0.25em; + right: 0; + padding-top: 2em; +} + +#guides dt, #guides dd { + font-weight: normal; + font-size: 0.722em; + margin: 0; + padding: 0; +} +#guides dt {padding:0; margin: 0.5em 0 0;} +#guides a {color: #FFF; background: none !important;} +#guides .L, #guides .R {float: left; width: 50%; margin: 0; padding: 0;} +#guides .R {float: right;} +#guides hr { + display: block; + border: none; + height: 1px; + color: #f1938c; + background: #f1938c; +} + +/* Headings +--------------------------------------- */ + +h1 { + font-size: 2.5em; + line-height: 1em; + margin: 0.6em 0 .2em; + font-weight: bold; + } + +h2 { + font-size: 2.1428em; + line-height: 1em; + margin: 0.7em 0 .2333em; + font-weight: bold; + } + +h3 { + font-size: 1.7142em; + line-height: 1.286em; + margin: 0.875em 0 0.2916em; + font-weight: bold; + } + +h4 { + font-size: 1.2857em; + line-height: 1.2em; + margin: 1.6667em 0 .3887em; + font-weight: bold; + } + +h5 { + font-size: 1em; + line-height: 1.5em; + margin: 1em 0 .5em; + font-weight: bold; +} + +h6 { + font-size: 1em; + line-height: 1.5em; + margin: 1em 0 .5em; + font-weight: normal; + } + +.section { + padding-bottom: 0.25em; + border-bottom: 1px solid #999; +} + +/* Content +--------------------------------------- */ + +.pic { + margin: 0 2em 2em 0; +} + +#topNav strong {color: #999; margin-right: 0.5em;} +#topNav strong a {color: #FFF;} + +#header h1 { + float: left; + background: url(../images/rails_guides_logo.gif) no-repeat; + width: 297px; + text-indent: -9999em; + margin: 0; + padding: 0; +} + +#header h1 a { + text-decoration: none; + display: block; + height: 77px; +} + +#feature p { + font-size: 1.2857em; + margin-bottom: 0.75em; +} + +#feature ul {margin-left: 0;} +#feature ul li { + list-style: none; + background: url(../images/check_bullet.gif) no-repeat left 0.5em; + padding: 0.5em 1.75em 0.5em 1.75em; + font-size: 1.1428em; + font-weight: bold; +} + +#mainCol dd, #subCol dd { + padding: 0.25em 0 1em; + border-bottom: 1px solid #CCC; + margin-bottom: 1em; + margin-left: 0; + /*padding-left: 28px;*/ + padding-left: 0; +} + +#mainCol dt, #subCol dt { + font-size: 1.2857em; + padding: 0.125em 0 0.25em 0; + margin-bottom: 0; + /*background: url(../images/book_icon.gif) no-repeat left top; + padding: 0.125em 0 0.25em 28px;*/ +} + +#mainCol dd.ticket, #subCol dd.ticket { + background: #fff9d8 url(../images/tab_yellow.gif) no-repeat left top; + border: none; + padding: 1.25em 1em 1.25em 48px; + margin-left: 0; + margin-top: 0.25em; +} + +#mainCol div.warning, #subCol dd.warning { + background: #f9d9d8 url(../images/tab_red.gif) no-repeat left top; + border: none; + padding: 1.25em 1.25em 1.25em 48px; + margin-left: 0; + margin-top: 0.25em; +} + +#subCol .chapters {color: #980905;} +#subCol .chapters a {font-weight: bold;} +#subCol .chapters ul a {font-weight: normal;} +#subCol .chapters li {margin-bottom: 0.75em;} +#subCol h3.chapter {margin-top: 0.25em;} +#subCol h3.chapter img {vertical-align: text-bottom;} +#subCol .chapters ul {margin-left: 0; margin-top: 0.5em;} +#subCol .chapters ul li { + list-style: none; + padding: 0 0 0 1em; + background: url(../images/bullet.gif) no-repeat left 0.45em; + margin-left: 0; + font-size: 1em; + font-weight: normal; +} + +tt { + font-family: monaco, "Bitstream Vera Sans Mono", "Courier New", courier, monospace; +} + +div.code_container { + background: #EEE url(../images/tab_grey.gif) no-repeat left top; + padding: 0.25em 1em 0.5em 48px; +} + +code { + font-family: monaco, "Bitstream Vera Sans Mono", "Courier New", courier, monospace; + border: none; + margin: 0.25em 0 1.5em 0; + display: block; +} + +.note { + background: #fff9d8 url(../images/tab_note.gif) no-repeat left top; + border: none; + padding: 1em 1em 0.25em 48px; + margin: 0.25em 0 1.5em 0; +} + +.info { + background: #d5e9f6 url(../images/tab_info.gif) no-repeat left top; + border: none; + padding: 1em 1em 0.25em 48px; + margin: 0.25em 0 1.5em 0; +} + +.note tt, .info tt {border:none; background: none; padding: 0;} + +#mainCol ul li { + list-style:none; + background: url(../images/grey_bullet.gif) no-repeat left 0.5em; + padding-left: 1em; + margin-left: 0; +} + +#subCol .content { + font-size: 0.7857em; + line-height: 1.5em; +} + +#subCol .content li { + font-weight: normal; + background: none; + padding: 0 0 1em; + font-size: 1.1667em; +} + +/* Clearing +--------------------------------------- */ + +.clearfix:after { + content: "."; + display: block; + height: 0; + clear: both; + visibility: hidden; +} + +.clearfix {display: inline-block;} +* html .clearfix {height: 1%;} +.clearfix {display: block;} +.clear { clear:both; } + +/* Same bottom margin for special boxes than for regular paragraphs, this way +intermediate whitespace looks uniform. */ +div.code_container, div.important, div.caution, div.warning, div.note, div.info { + margin-bottom: 1.5em; +} + +/* Remove bottom margin of paragraphs in special boxes, otherwise they get a +spurious blank area below with the box background. */ +div.important p, div.caution p, div.warning p, div.note p, div.info p { + margin-bottom: 0px; +} + +/* Edge Badge +--------------------------------------- */ + +#edge-badge { + position: fixed; + right: 0px; + top: 0px; + z-index: 100; + border: none; +} diff --git a/railties/guides/assets/stylesheets/print.css b/railties/guides/assets/stylesheets/print.css new file mode 100755 index 0000000000..628da105d4 --- /dev/null +++ b/railties/guides/assets/stylesheets/print.css @@ -0,0 +1,52 @@ +/* Guides.rubyonrails.org */ +/* Print.css */ +/* Created January 30, 2009 */ +/* Modified January 31, 2009 +--------------------------------------- */ + +body, .wrapper, .note, .info, code, #topNav, .L, .R, #frame, #container, #header, #navigation, #footer, #feature, #mainCol, #subCol, #extraCol, .content {position: static; text-align: left; text-indent: 0; background: White; color: Black; border-color: Black; width: auto; height: auto; display: block; float: none; min-height: 0; margin: 0; padding: 0;} + +body { + background: #FFF; + font-size: 10pt !important; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + line-height: 1.5; + color: #000; + padding: 0 3%; + } + +.hide, .nav { + display: none !important; + } + +a:link, a:visited { + background: transparent; + font-weight: bold; + text-decoration: underline; + } + +hr { + background:#ccc; + color:#ccc; + width:100%; + height:2px; + margin:2em 0; + padding:0; + border:none; +} + +h1,h2,h3,h4,h5,h6 { font-family: "Helvetica Neue", Arial, "Lucida Grande", sans-serif; } +code { font:.9em "Courier New", Monaco, Courier, monospace; } + +img { float:left; margin:1.5em 1.5em 1.5em 0; } +a img { border:none; } + +blockquote { + margin:1.5em; + padding:1em; + font-style:italic; + font-size:.9em; +} + +.small { font-size: .9em; } +.large { font-size: 1.1em; } diff --git a/railties/guides/assets/stylesheets/reset.css b/railties/guides/assets/stylesheets/reset.css new file mode 100755 index 0000000000..cb14fbcc55 --- /dev/null +++ b/railties/guides/assets/stylesheets/reset.css @@ -0,0 +1,43 @@ +/* Guides.rubyonrails.org */ +/* Reset.css */ +/* Created January 30, 2009 +--------------------------------------- */ + +html, body, div, span, applet, object, iframe, +h1, h2, h3, h4, h5, h6, p, blockquote, pre, +a, abbr, acronym, address, big, cite, code, +del, dfn, em, font, img, ins, kbd, q, s, samp, +small, strike, strong, sub, sup, tt, var, +b, u, i, center, +dl, dt, dd, ol, ul, li, +fieldset, form, label, legend, +table, caption, tbody, tfoot, thead, tr, th, td { + margin: 0; + padding: 0; + border: 0; + outline: 0; + font-size: 100%; + background: transparent; +} + +body {line-height: 1; color: black; background: white;} +a img {border:none;} +ins {text-decoration: none;} +del {text-decoration: line-through;} + +:focus { + -moz-outline:0; + outline:0; + outline-offset:0; +} + +/* tables still need 'cellspacing="0"' in the markup */ +table {border-collapse: collapse; border-spacing: 0;} +caption, th, td {text-align: left; font-weight: normal;} + +blockquote, q {quotes: none;} +blockquote:before, blockquote:after, +q:before, q:after { + content: ''; + content: none; +} diff --git a/railties/guides/assets/stylesheets/style.css b/railties/guides/assets/stylesheets/style.css new file mode 100755 index 0000000000..89b2ab885a --- /dev/null +++ b/railties/guides/assets/stylesheets/style.css @@ -0,0 +1,13 @@ +/* Guides.rubyonrails.org */ +/* Style.css */ +/* Created January 30, 2009 +--------------------------------------- */ + +/* +--------------------------------------- +Import advanced style sheet +--------------------------------------- +*/ + +@import url("reset.css"); +@import url("main.css"); diff --git a/railties/guides/assets/stylesheets/syntax.css b/railties/guides/assets/stylesheets/syntax.css new file mode 100644 index 0000000000..55fc5b209f --- /dev/null +++ b/railties/guides/assets/stylesheets/syntax.css @@ -0,0 +1,31 @@ +.html .tag { + color : green; +} + +.html .doctype { + color: #708090; +} + +.erb .tag { + color : green; +} + +.erb .doctype { + color: #708090; +} + +.ruby .keywords { + color : red; +} + +.ruby .ivar { + color : blue; +} + +.ruby .comment { + color: #708090; +} + +.ruby .symbol { + color: green; +} diff --git a/railties/guides/files/javascripts/code_highlighter.js b/railties/guides/files/javascripts/code_highlighter.js deleted file mode 100755 index ce983dad52..0000000000 --- a/railties/guides/files/javascripts/code_highlighter.js +++ /dev/null @@ -1,188 +0,0 @@ -/* Unobtrustive Code Highlighter By Dan Webb 11/2005 - Version: 0.4 - - Usage: - Add a script tag for this script and any stylesets you need to use - to the page in question, add correct class names to CODE elements, - define CSS styles for elements. That's it! - - Known to work on: - IE 5.5+ PC - Firefox/Mozilla PC/Mac - Opera 7.23 + PC - Safari 2 - - Known to degrade gracefully on: - IE5.0 PC - - Note: IE5.0 fails due to the use of lookahead in some stylesets. To avoid script errors - in older browsers use expressions that use lookahead in string format when defining stylesets. - - This script is inspired by star-light by entirely cunning Dean Edwards - http://dean.edwards.name/star-light/. -*/ - -// replace callback support for safari. -if ("a".replace(/a/, function() {return "b"}) != "b") (function(){ - var default_replace = String.prototype.replace; - String.prototype.replace = function(search,replace){ - // replace is not function - if(typeof replace != "function"){ - return default_replace.apply(this,arguments) - } - var str = "" + this; - var callback = replace; - // search string is not RegExp - if(!(search instanceof RegExp)){ - var idx = str.indexOf(search); - return ( - idx == -1 ? str : - default_replace.apply(str,[search,callback(search, idx, str)]) - ) - } - var reg = search; - var result = []; - var lastidx = reg.lastIndex; - var re; - while((re = reg.exec(str)) != null){ - var idx = re.index; - var args = re.concat(idx, str); - result.push( - str.slice(lastidx,idx), - callback.apply(null,args).toString() - ); - if(!reg.global){ - lastidx += RegExp.lastMatch.length; - break - }else{ - lastidx = reg.lastIndex; - } - } - result.push(str.slice(lastidx)); - return result.join("") - } -})(); - -var CodeHighlighter = { styleSets : new Array }; - -CodeHighlighter.addStyle = function(name, rules) { - // using push test to disallow older browsers from adding styleSets - if ([].push) this.styleSets.push({ - name : name, - rules : rules, - ignoreCase : arguments[2] || false - }) - - function setEvent() { - // set highlighter to run on load (use LowPro if present) - if (typeof Event != 'undefined' && typeof Event.onReady == 'function') - return Event.onReady(CodeHighlighter.init.bind(CodeHighlighter)); - - var old = window.onload; - - if (typeof window.onload != 'function') { - window.onload = function() { CodeHighlighter.init() }; - } else { - window.onload = function() { - old(); - CodeHighlighter.init(); - } - } - } - - // only set the event when the first style is added - if (this.styleSets.length==1) setEvent(); -} - -CodeHighlighter.init = function() { - if (!document.getElementsByTagName) return; - if ("a".replace(/a/, function() {return "b"}) != "b") return; // throw out Safari versions that don't support replace function - // throw out older browsers - - var codeEls = document.getElementsByTagName("CODE"); - // collect array of all pre elements - codeEls.filter = function(f) { - var a = new Array; - for (var i = 0; i < this.length; i++) if (f(this[i])) a[a.length] = this[i]; - return a; - } - - var rules = new Array; - rules.toString = function() { - // joins regexes into one big parallel regex - var exps = new Array; - for (var i = 0; i < this.length; i++) exps.push(this[i].exp); - return exps.join("|"); - } - - function addRule(className, rule) { - // add a replace rule - var exp = (typeof rule.exp != "string")?String(rule.exp).substr(1, String(rule.exp).length-2):rule.exp; - // converts regex rules to strings and chops of the slashes - rules.push({ - className : className, - exp : "(" + exp + ")", - length : (exp.match(/(^|[^\\])\([^?]/g) || "").length + 1, // number of subexps in rule - replacement : rule.replacement || null - }); - } - - function parse(text, ignoreCase) { - // main text parsing and replacement - return text.replace(new RegExp(rules, (ignoreCase)?"gi":"g"), function() { - var i = 0, j = 1, rule; - while (rule = rules[i++]) { - if (arguments[j]) { - // if no custom replacement defined do the simple replacement - if (!rule.replacement) return "" + arguments[0] + ""; - else { - // replace $0 with the className then do normal replaces - var str = rule.replacement.replace("$0", rule.className); - for (var k = 1; k <= rule.length - 1; k++) str = str.replace("$" + k, arguments[j + k]); - return str; - } - } else j+= rule.length; - } - }); - } - - function highlightCode(styleSet) { - // clear rules array - var parsed, clsRx = new RegExp("(\\s|^)" + styleSet.name + "(\\s|$)"); - rules.length = 0; - - // get stylable elements by filtering out all code elements without the correct className - var stylableEls = codeEls.filter(function(item) { return clsRx.test(item.className) }); - - // add style rules to parser - for (var className in styleSet.rules) addRule(className, styleSet.rules[className]); - - - // replace for all elements - for (var i = 0; i < stylableEls.length; i++) { - // EVIL hack to fix IE whitespace badness if it's inside a
-			if (/MSIE/.test(navigator.appVersion) && stylableEls[i].parentNode.nodeName == 'PRE') {
-				stylableEls[i] = stylableEls[i].parentNode;
-
-				parsed = stylableEls[i].innerHTML.replace(/(]*>)([^<]*)<\/code>/i, function() {
-					return arguments[1] + parse(arguments[2], styleSet.ignoreCase) + ""
-				});
-				parsed = parsed.replace(/\n( *)/g, function() {
-					var spaces = "";
-					for (var i = 0; i < arguments[1].length; i++) spaces+= " ";
-					return "\n" + spaces;
-				});
-				parsed = parsed.replace(/\t/g, "    ");
-				parsed = parsed.replace(/\n(<\/\w+>)?/g, "
$1").replace(/
[\n\r\s]*
/g, "


"); - - } else parsed = parse(stylableEls[i].innerHTML, styleSet.ignoreCase); - - stylableEls[i].innerHTML = parsed; - } - } - - // run highlighter on all stylesets - for (var i=0; i < this.styleSets.length; i++) { - highlightCode(this.styleSets[i]); - } -} diff --git a/railties/guides/files/javascripts/guides.js b/railties/guides/files/javascripts/guides.js deleted file mode 100755 index c4e4d459ea..0000000000 --- a/railties/guides/files/javascripts/guides.js +++ /dev/null @@ -1,7 +0,0 @@ -function guideMenu(){ - if (document.getElementById('guides').style.display == "none") { - document.getElementById('guides').style.display = "block"; - } else { - document.getElementById('guides').style.display = "none"; - } -} diff --git a/railties/guides/files/javascripts/highlighters.js b/railties/guides/files/javascripts/highlighters.js deleted file mode 100644 index 4f5f0779d7..0000000000 --- a/railties/guides/files/javascripts/highlighters.js +++ /dev/null @@ -1,90 +0,0 @@ -CodeHighlighter.addStyle("css", { - comment : { - exp : /\/\*[^*]*\*+([^\/][^*]*\*+)*\// - }, - keywords : { - exp : /@\w[\w\s]*/ - }, - selectors : { - exp : "([\\w-:\\[.#][^{};>]*)(?={)" - }, - properties : { - exp : "([\\w-]+)(?=\\s*:)" - }, - units : { - exp : /([0-9])(em|en|px|%|pt)\b/, - replacement : "$1$2" - }, - urls : { - exp : /url\([^\)]*\)/ - } - }); - -CodeHighlighter.addStyle("ruby",{ - comment : { - exp : /#[^\n]+/ - }, - brackets : { - exp : /\(|\)/ - }, - string : { - exp : /'[^']*'|"[^"]*"/ - }, - keywords : { - exp : /\b(do|end|self|class|def|if|module|yield|then|else|for|until|unless|while|elsif|case|when|break|retry|redo|rescue|require|raise)\b/ - }, - /* Added by Shelly Fisher (shelly@agileevolved.com) */ - symbol : { - exp : /([^:])(:[A-Za-z0-9_!?]+)/ - }, - ivar : { - exp : /\@[A-Za-z0-9_!?]+/ - } -}); - -CodeHighlighter.addStyle("html", { - comment : { - exp: /<!\s*(--([^-]|[\r\n]|-[^-])*--\s*)>/ - }, - tag : { - exp: /(<\/?)([a-zA-Z1-9]+\s?)/, - replacement: "$1$2" - }, - string : { - exp : /'[^']*'|"[^"]*"/ - }, - attribute : { - exp: /\b([a-zA-Z-:]+)(=)/, - replacement: "$1$2" - }, - doctype : { - exp: /<!DOCTYPE([^&]|&[^g]|&g[^t])*>/ - } -}); - -CodeHighlighter.addStyle("javascript",{ - comment : { - exp : /(\/\/[^\n]*(\n|$))|(\/\*[^*]*\*+([^\/][^*]*\*+)*\/)/ - }, - brackets : { - exp : /\(|\)/ - }, - string : { - exp : /'[^']*'|"[^"]*"/ - }, - keywords : { - exp : /\b(arguments|break|case|continue|default|delete|do|else|false|for|function|if|in|instanceof|new|null|return|switch|this|true|typeof|var|void|while|with)\b/ - }, - global : { - exp : /\b(toString|valueOf|window|element|prototype|constructor|document|escape|unescape|parseInt|parseFloat|setTimeout|clearTimeout|setInterval|clearInterval|NaN|isNaN|Infinity)\b/ - } -}); - -CodeHighlighter.addStyle("yaml", { - keyword : { - exp : /\/\*[^*]*\*+([^\/][^*]*\*+)*\// - }, - value : { - exp : /@\w[\w\s]*/ - }, -}); diff --git a/railties/guides/files/stylesheets/main.css b/railties/guides/files/stylesheets/main.css deleted file mode 100644 index 2fd0a2f37e..0000000000 --- a/railties/guides/files/stylesheets/main.css +++ /dev/null @@ -1,452 +0,0 @@ -/* Guides.rubyonrails.org */ -/* Main.css */ -/* Created January 30, 2009 */ -/* Modified February 8, 2009 ---------------------------------------- */ - -/* General ---------------------------------------- */ - -.left {float: left; margin-right: 1em;} -.right {float: right; margin-left: 1em;} -.small {font-size: smaller;} -.large {font-size: larger;} -.hide {display: none;} - -li ul, li ol { margin:0 1.5em; } -ul, ol { margin: 0 1.5em 1.5em 1.5em; } - -ul { list-style-type: disc; } -ol { list-style-type: decimal; } - -dl { margin: 0 0 1.5em 0; } -dl dt { font-weight: bold; } -dd { margin-left: 1.5em;} - -pre,code { margin: 1.5em 0; white-space: pre; overflow: auto; } -pre,code,tt { font: 1em 'andale mono', 'lucida console', monospace; line-height: 1.5; } - -abbr, acronym { border-bottom: 1px dotted #666; } -address { margin: 0 0 1.5em; font-style: italic; } -del { color:#666; } - -blockquote { margin: 1.5em; color: #666; font-style: italic; } -strong { font-weight: bold; } -em, dfn { font-style: italic; } -dfn { font-weight: bold; } -sup, sub { line-height: 0; } -p {margin: 0 0 1.5em;} - -label { font-weight: bold; } -fieldset { padding:1.4em; margin: 0 0 1.5em 0; border: 1px solid #ccc; } -legend { font-weight: bold; font-size:1.2em; } - -input.text, input.title, -textarea, select { - margin:0.5em 0; - border:1px solid #bbb; -} - -table { - margin: 0 0 1.5em; - border: 2px solid #CCC; - background: #FFF; - border-collapse: collapse; -} - -table th, table td { - padding: 0.25em 1em; - border: 1px solid #CCC; - border-collapse: collapse; -} - -table th { - border-bottom: 2px solid #CCC; - background: #EEE; - font-weight: bold; - padding: 0.5em 1em; -} - - -/* Structure and Layout ---------------------------------------- */ - -body { - text-align: center; - font-family: Helvetica, Arial, sans-serif; - font-size: 87.5%; - line-height: 1.5em; - background: #222; - color: #999; - } - -.wrapper { - text-align: left; - margin: 0 auto; - width: 69em; - } - -#topNav { - padding: 1em 0; - color: #565656; -} - -#header { - background: #c52f24 url(../../images/header_tile.gif) repeat-x; - color: #FFF; - padding: 1.5em 0; - position: relative; - z-index: 99; - } - -#feature { - background: #d5e9f6 url(../../images/feature_tile.gif) repeat-x; - color: #333; - padding: 0.5em 0 1.5em; -} - -#container { - background: #FFF; - color: #333; - padding: 0.5em 0 1.5em 0; - } - -#mainCol { - width: 45em; - margin-left: 2em; - } - -#subCol { - position: absolute; - z-index: 0; - top: 0; - right: 0; - background: #FFF; - padding: 1em 1.5em 1em 1.25em; - width: 17em; - font-size: 0.9285em; - line-height: 1.3846em; - } - -#extraCol {display: none;} - -#footer { - padding: 2em 0; - background: url(../../images/footer_tile.gif) repeat-x; - } -#footer .wrapper { - padding-left: 2em; - width: 67em; -} - -#header .wrapper, #topNav .wrapper, #feature .wrapper {padding-left: 1em; width: 68em;} -#feature .wrapper {width: 45em; padding-right: 23em; position: relative; z-index: 0;} - -/* Links ---------------------------------------- */ - -a, a:link, a:visited { - color: #ee3f3f; - text-decoration: underline; - } - -#mainCol a, #subCol a, #feature a {color: #980905;} - - -/* Navigation ---------------------------------------- */ - -.nav {margin: 0; padding: 0;} -.nav li {display: inline; list-style: none;} - -#header .nav { - float: right; - margin-top: 1.5em; - font-size: 1.2857em; -} - -#header .nav li {margin: 0 0 0 0.5em;} -#header .nav a {color: #FFF; text-decoration: none;} -#header .nav a:hover {text-decoration: underline;} - -#header .nav .index { - padding: 0.5em 1.5em; - border-radius: 1em; - -webkit-border-radius: 1em; - -moz-border-radius: 1em; - background: #980905; - position: relative; -} - -#header .nav .index a { - background: #980905 url(../../images/nav_arrow.gif) no-repeat right top; - padding-right: 1em; - position: relative; - z-index: 15; - padding-bottom: 0.125em; -} -#header .nav .index:hover a, #header .nav .index a:hover {background-position: right -81px;} - -#guides { - width: 27em; - display: block; - background: #980905; - border-radius: 1em; - -webkit-border-radius: 1em; - -moz-border-radius: 1em; - -webkit-box-shadow: 0.25em 0.25em 1em rgba(0,0,0,0.25); - -moz-box-shadow: rgba(0,0,0,0.25) 0.25em 0.25em 1em; - color: #f1938c; - padding: 1.5em 2em; - position: absolute; - z-index: 10; - top: -0.25em; - right: 0; - padding-top: 2em; -} - -#guides dt, #guides dd { - font-weight: normal; - font-size: 0.722em; - margin: 0; - padding: 0; -} -#guides dt {padding:0; margin: 0.5em 0 0;} -#guides a {color: #FFF; background: none !important;} -#guides .L, #guides .R {float: left; width: 50%; margin: 0; padding: 0;} -#guides .R {float: right;} -#guides hr { - display: block; - border: none; - height: 1px; - color: #f1938c; - background: #f1938c; -} - -/* Headings ---------------------------------------- */ - -h1 { - font-size: 2.5em; - line-height: 1em; - margin: 0.6em 0 .2em; - font-weight: bold; - } - -h2 { - font-size: 2.1428em; - line-height: 1em; - margin: 0.7em 0 .2333em; - font-weight: bold; - } - -h3 { - font-size: 1.7142em; - line-height: 1.286em; - margin: 0.875em 0 0.2916em; - font-weight: bold; - } - -h4 { - font-size: 1.2857em; - line-height: 1.2em; - margin: 1.6667em 0 .3887em; - font-weight: bold; - } - -h5 { - font-size: 1em; - line-height: 1.5em; - margin: 1em 0 .5em; - font-weight: bold; -} - -h6 { - font-size: 1em; - line-height: 1.5em; - margin: 1em 0 .5em; - font-weight: normal; - } - -.section { - padding-bottom: 0.25em; - border-bottom: 1px solid #999; -} - -/* Content ---------------------------------------- */ - -.pic { - margin: 0 2em 2em 0; -} - -#topNav strong {color: #999; margin-right: 0.5em;} -#topNav strong a {color: #FFF;} - -#header h1 { - float: left; - background: url(../../images/rails_guides_logo.gif) no-repeat; - width: 297px; - text-indent: -9999em; - margin: 0; - padding: 0; -} - -#header h1 a { - text-decoration: none; - display: block; - height: 77px; -} - -#feature p { - font-size: 1.2857em; - margin-bottom: 0.75em; -} - -#feature ul {margin-left: 0;} -#feature ul li { - list-style: none; - background: url(../../images/check_bullet.gif) no-repeat left 0.5em; - padding: 0.5em 1.75em 0.5em 1.75em; - font-size: 1.1428em; - font-weight: bold; -} - -#mainCol dd, #subCol dd { - padding: 0.25em 0 1em; - border-bottom: 1px solid #CCC; - margin-bottom: 1em; - margin-left: 0; - /*padding-left: 28px;*/ - padding-left: 0; -} - -#mainCol dt, #subCol dt { - font-size: 1.2857em; - padding: 0.125em 0 0.25em 0; - margin-bottom: 0; - /*background: url(../../images/book_icon.gif) no-repeat left top; - padding: 0.125em 0 0.25em 28px;*/ -} - -#mainCol dd.ticket, #subCol dd.ticket { - background: #fff9d8 url(../../images/tab_yellow.gif) no-repeat left top; - border: none; - padding: 1.25em 1em 1.25em 48px; - margin-left: 0; - margin-top: 0.25em; -} - -#mainCol div.warning, #subCol dd.warning { - background: #f9d9d8 url(../../images/tab_red.gif) no-repeat left top; - border: none; - padding: 1.25em 1.25em 1.25em 48px; - margin-left: 0; - margin-top: 0.25em; -} - -#subCol .chapters {color: #980905;} -#subCol .chapters a {font-weight: bold;} -#subCol .chapters ul a {font-weight: normal;} -#subCol .chapters li {margin-bottom: 0.75em;} -#subCol h3.chapter {margin-top: 0.25em;} -#subCol h3.chapter img {vertical-align: text-bottom;} -#subCol .chapters ul {margin-left: 0; margin-top: 0.5em;} -#subCol .chapters ul li { - list-style: none; - padding: 0 0 0 1em; - background: url(../../images/bullet.gif) no-repeat left 0.45em; - margin-left: 0; - font-size: 1em; - font-weight: normal; -} - -tt { - font-family: monaco, "Bitstream Vera Sans Mono", "Courier New", courier, monospace; -} - -div.code_container { - background: #EEE url(../../images/tab_grey.gif) no-repeat left top; - padding: 0.25em 1em 0.5em 48px; -} - -code { - font-family: monaco, "Bitstream Vera Sans Mono", "Courier New", courier, monospace; - border: none; - margin: 0.25em 0 1.5em 0; - display: block; -} - -.note { - background: #fff9d8 url(../../images/tab_note.gif) no-repeat left top; - border: none; - padding: 1em 1em 0.25em 48px; - margin: 0.25em 0 1.5em 0; -} - -.info { - background: #d5e9f6 url(../../images/tab_info.gif) no-repeat left top; - border: none; - padding: 1em 1em 0.25em 48px; - margin: 0.25em 0 1.5em 0; -} - -.note tt, .info tt {border:none; background: none; padding: 0;} - -#mainCol ul li { - list-style:none; - background: url(../../images/grey_bullet.gif) no-repeat left 0.5em; - padding-left: 1em; - margin-left: 0; -} - -#subCol .content { - font-size: 0.7857em; - line-height: 1.5em; -} - -#subCol .content li { - font-weight: normal; - background: none; - padding: 0 0 1em; - font-size: 1.1667em; -} - -/* Clearing ---------------------------------------- */ - -.clearfix:after { - content: "."; - display: block; - height: 0; - clear: both; - visibility: hidden; -} - -.clearfix {display: inline-block;} -* html .clearfix {height: 1%;} -.clearfix {display: block;} -.clear { clear:both; } - -/* Same bottom margin for special boxes than for regular paragraphs, this way -intermediate whitespace looks uniform. */ -div.code_container, div.important, div.caution, div.warning, div.note, div.info { - margin-bottom: 1.5em; -} - -/* Remove bottom margin of paragraphs in special boxes, otherwise they get a -spurious blank area below with the box background. */ -div.important p, div.caution p, div.warning p, div.note p, div.info p { - margin-bottom: 0px; -} - -/* Edge Badge ---------------------------------------- */ - -#edge-badge { - position: fixed; - right: 0px; - top: 0px; - z-index: 100; - border: none; -} diff --git a/railties/guides/files/stylesheets/print.css b/railties/guides/files/stylesheets/print.css deleted file mode 100755 index 628da105d4..0000000000 --- a/railties/guides/files/stylesheets/print.css +++ /dev/null @@ -1,52 +0,0 @@ -/* Guides.rubyonrails.org */ -/* Print.css */ -/* Created January 30, 2009 */ -/* Modified January 31, 2009 ---------------------------------------- */ - -body, .wrapper, .note, .info, code, #topNav, .L, .R, #frame, #container, #header, #navigation, #footer, #feature, #mainCol, #subCol, #extraCol, .content {position: static; text-align: left; text-indent: 0; background: White; color: Black; border-color: Black; width: auto; height: auto; display: block; float: none; min-height: 0; margin: 0; padding: 0;} - -body { - background: #FFF; - font-size: 10pt !important; - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - line-height: 1.5; - color: #000; - padding: 0 3%; - } - -.hide, .nav { - display: none !important; - } - -a:link, a:visited { - background: transparent; - font-weight: bold; - text-decoration: underline; - } - -hr { - background:#ccc; - color:#ccc; - width:100%; - height:2px; - margin:2em 0; - padding:0; - border:none; -} - -h1,h2,h3,h4,h5,h6 { font-family: "Helvetica Neue", Arial, "Lucida Grande", sans-serif; } -code { font:.9em "Courier New", Monaco, Courier, monospace; } - -img { float:left; margin:1.5em 1.5em 1.5em 0; } -a img { border:none; } - -blockquote { - margin:1.5em; - padding:1em; - font-style:italic; - font-size:.9em; -} - -.small { font-size: .9em; } -.large { font-size: 1.1em; } diff --git a/railties/guides/files/stylesheets/reset.css b/railties/guides/files/stylesheets/reset.css deleted file mode 100755 index cb14fbcc55..0000000000 --- a/railties/guides/files/stylesheets/reset.css +++ /dev/null @@ -1,43 +0,0 @@ -/* Guides.rubyonrails.org */ -/* Reset.css */ -/* Created January 30, 2009 ---------------------------------------- */ - -html, body, div, span, applet, object, iframe, -h1, h2, h3, h4, h5, h6, p, blockquote, pre, -a, abbr, acronym, address, big, cite, code, -del, dfn, em, font, img, ins, kbd, q, s, samp, -small, strike, strong, sub, sup, tt, var, -b, u, i, center, -dl, dt, dd, ol, ul, li, -fieldset, form, label, legend, -table, caption, tbody, tfoot, thead, tr, th, td { - margin: 0; - padding: 0; - border: 0; - outline: 0; - font-size: 100%; - background: transparent; -} - -body {line-height: 1; color: black; background: white;} -a img {border:none;} -ins {text-decoration: none;} -del {text-decoration: line-through;} - -:focus { - -moz-outline:0; - outline:0; - outline-offset:0; -} - -/* tables still need 'cellspacing="0"' in the markup */ -table {border-collapse: collapse; border-spacing: 0;} -caption, th, td {text-align: left; font-weight: normal;} - -blockquote, q {quotes: none;} -blockquote:before, blockquote:after, -q:before, q:after { - content: ''; - content: none; -} diff --git a/railties/guides/files/stylesheets/style.css b/railties/guides/files/stylesheets/style.css deleted file mode 100755 index 89b2ab885a..0000000000 --- a/railties/guides/files/stylesheets/style.css +++ /dev/null @@ -1,13 +0,0 @@ -/* Guides.rubyonrails.org */ -/* Style.css */ -/* Created January 30, 2009 ---------------------------------------- */ - -/* ---------------------------------------- -Import advanced style sheet ---------------------------------------- -*/ - -@import url("reset.css"); -@import url("main.css"); diff --git a/railties/guides/files/stylesheets/syntax.css b/railties/guides/files/stylesheets/syntax.css deleted file mode 100644 index 55fc5b209f..0000000000 --- a/railties/guides/files/stylesheets/syntax.css +++ /dev/null @@ -1,31 +0,0 @@ -.html .tag { - color : green; -} - -.html .doctype { - color: #708090; -} - -.erb .tag { - color : green; -} - -.erb .doctype { - color: #708090; -} - -.ruby .keywords { - color : red; -} - -.ruby .ivar { - color : blue; -} - -.ruby .comment { - color: #708090; -} - -.ruby .symbol { - color: green; -} diff --git a/railties/guides/images/belongs_to.png b/railties/guides/images/belongs_to.png deleted file mode 100644 index 44243edbca..0000000000 Binary files a/railties/guides/images/belongs_to.png and /dev/null differ diff --git a/railties/guides/images/book_icon.gif b/railties/guides/images/book_icon.gif deleted file mode 100644 index c81d5db520..0000000000 Binary files a/railties/guides/images/book_icon.gif and /dev/null differ diff --git a/railties/guides/images/bullet.gif b/railties/guides/images/bullet.gif deleted file mode 100644 index 95a26364a4..0000000000 Binary files a/railties/guides/images/bullet.gif and /dev/null differ diff --git a/railties/guides/images/challenge.png b/railties/guides/images/challenge.png deleted file mode 100644 index d163748640..0000000000 Binary files a/railties/guides/images/challenge.png and /dev/null differ diff --git a/railties/guides/images/chapters_icon.gif b/railties/guides/images/chapters_icon.gif deleted file mode 100644 index 06fb415f4a..0000000000 Binary files a/railties/guides/images/chapters_icon.gif and /dev/null differ diff --git a/railties/guides/images/check_bullet.gif b/railties/guides/images/check_bullet.gif deleted file mode 100644 index 1fcfeba250..0000000000 Binary files a/railties/guides/images/check_bullet.gif and /dev/null differ diff --git a/railties/guides/images/credits_pic_blank.gif b/railties/guides/images/credits_pic_blank.gif deleted file mode 100644 index f6f654fc65..0000000000 Binary files a/railties/guides/images/credits_pic_blank.gif and /dev/null differ diff --git a/railties/guides/images/csrf.png b/railties/guides/images/csrf.png deleted file mode 100644 index ab73baafe8..0000000000 Binary files a/railties/guides/images/csrf.png and /dev/null differ diff --git a/railties/guides/images/customized_error_messages.png b/railties/guides/images/customized_error_messages.png deleted file mode 100644 index fa676991e3..0000000000 Binary files a/railties/guides/images/customized_error_messages.png and /dev/null differ diff --git a/railties/guides/images/edge_badge.png b/railties/guides/images/edge_badge.png deleted file mode 100644 index cddd46c4b8..0000000000 Binary files a/railties/guides/images/edge_badge.png and /dev/null differ diff --git a/railties/guides/images/error_messages.png b/railties/guides/images/error_messages.png deleted file mode 100644 index 428892194a..0000000000 Binary files a/railties/guides/images/error_messages.png and /dev/null differ diff --git a/railties/guides/images/feature_tile.gif b/railties/guides/images/feature_tile.gif deleted file mode 100644 index 75469361db..0000000000 Binary files a/railties/guides/images/feature_tile.gif and /dev/null differ diff --git a/railties/guides/images/footer_tile.gif b/railties/guides/images/footer_tile.gif deleted file mode 100644 index bb33fc1ff0..0000000000 Binary files a/railties/guides/images/footer_tile.gif and /dev/null differ diff --git a/railties/guides/images/fxn.png b/railties/guides/images/fxn.png deleted file mode 100644 index 9b531ee584..0000000000 Binary files a/railties/guides/images/fxn.png and /dev/null differ diff --git a/railties/guides/images/grey_bullet.gif b/railties/guides/images/grey_bullet.gif deleted file mode 100644 index e75e8e93a1..0000000000 Binary files a/railties/guides/images/grey_bullet.gif and /dev/null differ diff --git a/railties/guides/images/habtm.png b/railties/guides/images/habtm.png deleted file mode 100644 index fea78b0b5c..0000000000 Binary files a/railties/guides/images/habtm.png and /dev/null differ diff --git a/railties/guides/images/has_many.png b/railties/guides/images/has_many.png deleted file mode 100644 index 6cff58460d..0000000000 Binary files a/railties/guides/images/has_many.png and /dev/null differ diff --git a/railties/guides/images/has_many_through.png b/railties/guides/images/has_many_through.png deleted file mode 100644 index 85d7599925..0000000000 Binary files a/railties/guides/images/has_many_through.png and /dev/null differ diff --git a/railties/guides/images/has_one.png b/railties/guides/images/has_one.png deleted file mode 100644 index a70ddaaa86..0000000000 Binary files a/railties/guides/images/has_one.png and /dev/null differ diff --git a/railties/guides/images/has_one_through.png b/railties/guides/images/has_one_through.png deleted file mode 100644 index 89a7617a30..0000000000 Binary files a/railties/guides/images/has_one_through.png and /dev/null differ diff --git a/railties/guides/images/header_backdrop.png b/railties/guides/images/header_backdrop.png deleted file mode 100644 index ff2982175e..0000000000 Binary files a/railties/guides/images/header_backdrop.png and /dev/null differ diff --git a/railties/guides/images/header_tile.gif b/railties/guides/images/header_tile.gif deleted file mode 100644 index e2c878d492..0000000000 Binary files a/railties/guides/images/header_tile.gif and /dev/null differ diff --git a/railties/guides/images/i18n/demo_localized_pirate.png b/railties/guides/images/i18n/demo_localized_pirate.png deleted file mode 100644 index 9134709573..0000000000 Binary files a/railties/guides/images/i18n/demo_localized_pirate.png and /dev/null differ diff --git a/railties/guides/images/i18n/demo_translated_en.png b/railties/guides/images/i18n/demo_translated_en.png deleted file mode 100644 index ecdd878d38..0000000000 Binary files a/railties/guides/images/i18n/demo_translated_en.png and /dev/null differ diff --git a/railties/guides/images/i18n/demo_translated_pirate.png b/railties/guides/images/i18n/demo_translated_pirate.png deleted file mode 100644 index 41c580923a..0000000000 Binary files a/railties/guides/images/i18n/demo_translated_pirate.png and /dev/null differ diff --git a/railties/guides/images/i18n/demo_translation_missing.png b/railties/guides/images/i18n/demo_translation_missing.png deleted file mode 100644 index af9e2d0427..0000000000 Binary files a/railties/guides/images/i18n/demo_translation_missing.png and /dev/null differ diff --git a/railties/guides/images/i18n/demo_untranslated.png b/railties/guides/images/i18n/demo_untranslated.png deleted file mode 100644 index 3603f43463..0000000000 Binary files a/railties/guides/images/i18n/demo_untranslated.png and /dev/null differ diff --git a/railties/guides/images/icons/README b/railties/guides/images/icons/README deleted file mode 100644 index f12b2a730c..0000000000 --- a/railties/guides/images/icons/README +++ /dev/null @@ -1,5 +0,0 @@ -Replaced the plain DocBook XSL admonition icons with Jimmac's DocBook -icons (http://jimmac.musichall.cz/ikony.php3). I dropped transparency -from the Jimmac icons to get round MS IE and FOP PNG incompatibilies. - -Stuart Rackham diff --git a/railties/guides/images/icons/callouts/1.png b/railties/guides/images/icons/callouts/1.png deleted file mode 100644 index 7d473430b7..0000000000 Binary files a/railties/guides/images/icons/callouts/1.png and /dev/null differ diff --git a/railties/guides/images/icons/callouts/10.png b/railties/guides/images/icons/callouts/10.png deleted file mode 100644 index 997bbc8246..0000000000 Binary files a/railties/guides/images/icons/callouts/10.png and /dev/null differ diff --git a/railties/guides/images/icons/callouts/11.png b/railties/guides/images/icons/callouts/11.png deleted file mode 100644 index ce47dac3f5..0000000000 Binary files a/railties/guides/images/icons/callouts/11.png and /dev/null differ diff --git a/railties/guides/images/icons/callouts/12.png b/railties/guides/images/icons/callouts/12.png deleted file mode 100644 index 31daf4e2f2..0000000000 Binary files a/railties/guides/images/icons/callouts/12.png and /dev/null differ diff --git a/railties/guides/images/icons/callouts/13.png b/railties/guides/images/icons/callouts/13.png deleted file mode 100644 index 14021a89c2..0000000000 Binary files a/railties/guides/images/icons/callouts/13.png and /dev/null differ diff --git a/railties/guides/images/icons/callouts/14.png b/railties/guides/images/icons/callouts/14.png deleted file mode 100644 index 64014b75fe..0000000000 Binary files a/railties/guides/images/icons/callouts/14.png and /dev/null differ diff --git a/railties/guides/images/icons/callouts/15.png b/railties/guides/images/icons/callouts/15.png deleted file mode 100644 index 0d65765fcf..0000000000 Binary files a/railties/guides/images/icons/callouts/15.png and /dev/null differ diff --git a/railties/guides/images/icons/callouts/2.png b/railties/guides/images/icons/callouts/2.png deleted file mode 100644 index 5d09341b2f..0000000000 Binary files a/railties/guides/images/icons/callouts/2.png and /dev/null differ diff --git a/railties/guides/images/icons/callouts/3.png b/railties/guides/images/icons/callouts/3.png deleted file mode 100644 index ef7b700471..0000000000 Binary files a/railties/guides/images/icons/callouts/3.png and /dev/null differ diff --git a/railties/guides/images/icons/callouts/4.png b/railties/guides/images/icons/callouts/4.png deleted file mode 100644 index adb8364eb5..0000000000 Binary files a/railties/guides/images/icons/callouts/4.png and /dev/null differ diff --git a/railties/guides/images/icons/callouts/5.png b/railties/guides/images/icons/callouts/5.png deleted file mode 100644 index 4d7eb46002..0000000000 Binary files a/railties/guides/images/icons/callouts/5.png and /dev/null differ diff --git a/railties/guides/images/icons/callouts/6.png b/railties/guides/images/icons/callouts/6.png deleted file mode 100644 index 0ba694af6c..0000000000 Binary files a/railties/guides/images/icons/callouts/6.png and /dev/null differ diff --git a/railties/guides/images/icons/callouts/7.png b/railties/guides/images/icons/callouts/7.png deleted file mode 100644 index 472e96f8ac..0000000000 Binary files a/railties/guides/images/icons/callouts/7.png and /dev/null differ diff --git a/railties/guides/images/icons/callouts/8.png b/railties/guides/images/icons/callouts/8.png deleted file mode 100644 index 5e60973c21..0000000000 Binary files a/railties/guides/images/icons/callouts/8.png and /dev/null differ diff --git a/railties/guides/images/icons/callouts/9.png b/railties/guides/images/icons/callouts/9.png deleted file mode 100644 index a0676d26cc..0000000000 Binary files a/railties/guides/images/icons/callouts/9.png and /dev/null differ diff --git a/railties/guides/images/icons/caution.png b/railties/guides/images/icons/caution.png deleted file mode 100644 index cb9d5ea0df..0000000000 Binary files a/railties/guides/images/icons/caution.png and /dev/null differ diff --git a/railties/guides/images/icons/example.png b/railties/guides/images/icons/example.png deleted file mode 100644 index bba1c0010d..0000000000 Binary files a/railties/guides/images/icons/example.png and /dev/null differ diff --git a/railties/guides/images/icons/home.png b/railties/guides/images/icons/home.png deleted file mode 100644 index 37a5231bac..0000000000 Binary files a/railties/guides/images/icons/home.png and /dev/null differ diff --git a/railties/guides/images/icons/important.png b/railties/guides/images/icons/important.png deleted file mode 100644 index 1096c23295..0000000000 Binary files a/railties/guides/images/icons/important.png and /dev/null differ diff --git a/railties/guides/images/icons/next.png b/railties/guides/images/icons/next.png deleted file mode 100644 index 64e126bdda..0000000000 Binary files a/railties/guides/images/icons/next.png and /dev/null differ diff --git a/railties/guides/images/icons/note.png b/railties/guides/images/icons/note.png deleted file mode 100644 index 841820f7c4..0000000000 Binary files a/railties/guides/images/icons/note.png and /dev/null differ diff --git a/railties/guides/images/icons/prev.png b/railties/guides/images/icons/prev.png deleted file mode 100644 index 3e8f12fe24..0000000000 Binary files a/railties/guides/images/icons/prev.png and /dev/null differ diff --git a/railties/guides/images/icons/tip.png b/railties/guides/images/icons/tip.png deleted file mode 100644 index a3a029d898..0000000000 Binary files a/railties/guides/images/icons/tip.png and /dev/null differ diff --git a/railties/guides/images/icons/up.png b/railties/guides/images/icons/up.png deleted file mode 100644 index 2db1ce62fa..0000000000 Binary files a/railties/guides/images/icons/up.png and /dev/null differ diff --git a/railties/guides/images/icons/warning.png b/railties/guides/images/icons/warning.png deleted file mode 100644 index 0b0c419df2..0000000000 Binary files a/railties/guides/images/icons/warning.png and /dev/null differ diff --git a/railties/guides/images/nav_arrow.gif b/railties/guides/images/nav_arrow.gif deleted file mode 100644 index c4f57658d7..0000000000 Binary files a/railties/guides/images/nav_arrow.gif and /dev/null differ diff --git a/railties/guides/images/polymorphic.png b/railties/guides/images/polymorphic.png deleted file mode 100644 index ff2fd9f76d..0000000000 Binary files a/railties/guides/images/polymorphic.png and /dev/null differ diff --git a/railties/guides/images/posts_index.png b/railties/guides/images/posts_index.png deleted file mode 100644 index f6cd2f9b80..0000000000 Binary files a/railties/guides/images/posts_index.png and /dev/null differ diff --git a/railties/guides/images/rails_guides_logo.gif b/railties/guides/images/rails_guides_logo.gif deleted file mode 100644 index a24683a34e..0000000000 Binary files a/railties/guides/images/rails_guides_logo.gif and /dev/null differ diff --git a/railties/guides/images/rails_logo_remix.gif b/railties/guides/images/rails_logo_remix.gif deleted file mode 100644 index 58960ee4f9..0000000000 Binary files a/railties/guides/images/rails_logo_remix.gif and /dev/null differ diff --git a/railties/guides/images/rails_welcome.png b/railties/guides/images/rails_welcome.png deleted file mode 100644 index 0e02cf5a8c..0000000000 Binary files a/railties/guides/images/rails_welcome.png and /dev/null differ diff --git a/railties/guides/images/session_fixation.png b/railties/guides/images/session_fixation.png deleted file mode 100644 index 6b084508db..0000000000 Binary files a/railties/guides/images/session_fixation.png and /dev/null differ diff --git a/railties/guides/images/tab_grey.gif b/railties/guides/images/tab_grey.gif deleted file mode 100644 index e9680b7136..0000000000 Binary files a/railties/guides/images/tab_grey.gif and /dev/null differ diff --git a/railties/guides/images/tab_info.gif b/railties/guides/images/tab_info.gif deleted file mode 100644 index 458fea9a61..0000000000 Binary files a/railties/guides/images/tab_info.gif and /dev/null differ diff --git a/railties/guides/images/tab_note.gif b/railties/guides/images/tab_note.gif deleted file mode 100644 index 1d5c171ed6..0000000000 Binary files a/railties/guides/images/tab_note.gif and /dev/null differ diff --git a/railties/guides/images/tab_red.gif b/railties/guides/images/tab_red.gif deleted file mode 100644 index daf140b5a8..0000000000 Binary files a/railties/guides/images/tab_red.gif and /dev/null differ diff --git a/railties/guides/images/tab_yellow.gif b/railties/guides/images/tab_yellow.gif deleted file mode 100644 index dc961c99dd..0000000000 Binary files a/railties/guides/images/tab_yellow.gif and /dev/null differ diff --git a/railties/guides/images/tab_yellow.png b/railties/guides/images/tab_yellow.png deleted file mode 100644 index cceea6581f..0000000000 Binary files a/railties/guides/images/tab_yellow.png and /dev/null differ diff --git a/railties/guides/images/validation_error_messages.png b/railties/guides/images/validation_error_messages.png deleted file mode 100644 index 622d35da5d..0000000000 Binary files a/railties/guides/images/validation_error_messages.png and /dev/null differ diff --git a/railties/guides/rails_guides/generator.rb b/railties/guides/rails_guides/generator.rb index 1454aed6e4..b8c1913819 100644 --- a/railties/guides/rails_guides/generator.rb +++ b/railties/guides/rails_guides/generator.rb @@ -107,8 +107,7 @@ module RailsGuides end def copy_assets - FileUtils.cp_r(File.join(guides_dir, 'images'), output_dir) - FileUtils.cp_r(File.join(guides_dir, 'files'), output_dir) + FileUtils.cp_r(Dir.glob("#{guides_dir}/assets/*"), output_dir) end def output_file_for(guide) diff --git a/railties/guides/source/contribute.textile b/railties/guides/source/contribute.textile index 1203e38a4e..8c64df5362 100644 --- a/railties/guides/source/contribute.textile +++ b/railties/guides/source/contribute.textile @@ -9,7 +9,7 @@ h3. How to Contribute? * We have an open commit policy: anyone is welcome to contribute, but you'll need to ask for commit access. * PM lifo at "GitHub":http://github.com asking for "docrails":http://github.com/lifo/docrails/tree/master commit access. * Guides are written in Textile, and reside at railties/guides/source in the docrails project. -* All images are in the railties/guides/images directory. +* Assets are stored in the +railties/guides/assets+ directory. * Sample format : "Active Record Associations":http://github.com/lifo/docrails/blob/3e56a3832415476fdd1cb963980d0ae390ac1ed3/railties/guides/source/association_basics.textile * Sample output : "Active Record Associations":association_basics.html * You can build the Guides during testing by running +rake generate_guides+ in the +railties+ directory. diff --git a/railties/guides/source/layout.html.erb b/railties/guides/source/layout.html.erb index 9819db1f89..b280101d25 100644 --- a/railties/guides/source/layout.html.erb +++ b/railties/guides/source/layout.html.erb @@ -7,13 +7,13 @@ <%= yield(:page_title) || 'Ruby on Rails guides' %> - - - + + + - - - + + + -- cgit v1.2.3 From 7f956af47f4eeed54644a887dbb5f2ffcd8e41b8 Mon Sep 17 00:00:00 2001 From: Jaime Iniesta Date: Sun, 4 Apr 2010 11:32:47 +0200 Subject: Added .DS_Store to .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 16bffc157b..9c3207049f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.DS_Store *.gem pkg .bundle -- cgit v1.2.3 From 96b70229d681006ce4b169541845935bc067e294 Mon Sep 17 00:00:00 2001 From: Jaime Iniesta Date: Sun, 4 Apr 2010 11:44:54 +0200 Subject: Updated changelog on getting_started and layouts_and_rendering --- railties/guides/source/getting_started.textile | 1 + railties/guides/source/layouts_and_rendering.textile | 1 + 2 files changed, 2 insertions(+) diff --git a/railties/guides/source/getting_started.textile b/railties/guides/source/getting_started.textile index 9cc96f8205..9669f7f155 100644 --- a/railties/guides/source/getting_started.textile +++ b/railties/guides/source/getting_started.textile @@ -1432,6 +1432,7 @@ h3. Changelog "Lighthouse ticket":http://rails.lighthouseapp.com/projects/16213-rails-guides/tickets/2 +* April 1, 2010: Fixed document to validate XHTML 1.0 Strict. "Jaime Iniesta":credits.html#jaimeiniesta * February 8, 2010: Full re-write for Rails 3.0-beta, added helpers and before_filters, refactored code by "Mikel Lindsaar":credits:html#raasdnil * January 24, 2010: Re-write for Rails 3.0 by "Mikel Lindsaar":credits:html#raasdnil * July 18, 2009: Minor cleanup in anticipation of Rails 2.3.3 by "Mike Gunderloy":credits.html#mgunderloy diff --git a/railties/guides/source/layouts_and_rendering.textile b/railties/guides/source/layouts_and_rendering.textile index 1ddba807e0..d9781fc966 100644 --- a/railties/guides/source/layouts_and_rendering.textile +++ b/railties/guides/source/layouts_and_rendering.textile @@ -1197,6 +1197,7 @@ h3. Changelog "Lighthouse ticket":http://rails.lighthouseapp.com/projects/16213-rails-guides/tickets/15 +* April 4, 2010: Fixed document to validate XHTML 1.0 Strict. "Jaime Iniesta":credits.html#jaimeiniesta * January 25, 2010: Rails 3.0 Update by "Mikel Lindsaar":credits.html#raasdnil * December 27, 2008: Merge patch from Rodrigo Rosenfeld Rosas covering subtemplates * December 27, 2008: Information on new rendering defaults by "Mike Gunderloy":credits.html#mgunderloy -- cgit v1.2.3 From be72a397f809360b5158db0b32429bf82593ceb5 Mon Sep 17 00:00:00 2001 From: Jaime Iniesta Date: Sun, 4 Apr 2010 11:48:10 +0200 Subject: Added 'Rails Guides Reviewers' section to credits --- railties/guides/source/credits.html.erb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/railties/guides/source/credits.html.erb b/railties/guides/source/credits.html.erb index 0f203765ac..9851702df9 100644 --- a/railties/guides/source/credits.html.erb +++ b/railties/guides/source/credits.html.erb @@ -59,6 +59,8 @@ Mikel Lindsaar has been working with Rails since 2006 and is the author of the Ruby Mail gem and core contributor (he helped re-write Action Mailer's API). Mikel has a blog and tweets. <% end %> +

Rails Guides Reviewers

+ <%= author('Jaime Iniesta', 'jaimeiniesta', 'jaimeiniesta.jpg') do %> Jaime Iniesta works as a Ruby on Rails freelance developer since 2005. He's a member of ProRuby, co-founder of the Spanish Ruby Users Group, member of Spain.rb, and organizer of Conferencia Rails and EuRuKo 2009. Jaime has a blog and tweets. <% end %> -- cgit v1.2.3 From af87232342b1bc82b45e2ac34e926753ca03d525 Mon Sep 17 00:00:00 2001 From: Jaime Iniesta Date: Sun, 4 Apr 2010 12:09:09 +0200 Subject: Fix testing guide so that it validates XHTML 1.0 Strict --- railties/guides/source/testing.textile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/railties/guides/source/testing.textile b/railties/guides/source/testing.textile index ac9fb4276e..b1eee0ccb9 100644 --- a/railties/guides/source/testing.textile +++ b/railties/guides/source/testing.textile @@ -411,7 +411,7 @@ NOTE: +assert_valid(record)+ has been deprecated. Please use +assert(record.vali |_.Assertion |_.Purpose| |+assert_valid(record)+ |Ensures that the passed record is valid by Active Record standards and returns any error messages if it is not.| |+assert_difference(expressions, difference = 1, message = nil) {...}+ |Test numeric difference between the return value of an expression as a result of what is evaluated in the yielded block.| -|+assert_no_difference(expressions, message = nil, &block)+ |Asserts that the numeric result of evaluating an expression is not changed before and after invoking the passed in block.| +|+assert_no_difference(expressions, message = nil, &block)+ |Asserts that the numeric result of evaluating an expression is not changed before and after invoking the passed in block.| |+assert_recognizes(expected_options, path, extras={}, message=nil)+ |Asserts that the routing of the given path was handled correctly and that the parsed options (given in the expected_options hash) match path. Basically, it asserts that Rails recognizes the route given by expected_options.| |+assert_generates(expected_path, options, defaults={}, extras = {}, message=nil)+ |Asserts that the provided options can be used to generate the provided path. This is the inverse of assert_recognizes. The extras parameter is used to tell the request the names and values of additional request parameters that would be in a query string. The message parameter allows you to specify a custom error message for assertion failures.| |+assert_response(type, message = nil)+ |Asserts that the response comes with a specific status code. You can specify +:success+ to indicate 200, +:redirect+ to indicate 300-399, +:missing+ to indicate 404, or +:error+ to match the 500-599 range| @@ -940,6 +940,7 @@ h3. Changelog "Lighthouse ticket":http://rails.lighthouseapp.com/projects/16213-rails-guides/tickets/8 +* April 4, 2010: Fixed document to validate XHTML 1.0 Strict. "Jaime Iniesta":credits.html#jaimeiniesta * November 13, 2008: Revised based on feedback from Pratik Naik by "Akshay Surve":credits.html#asurve (not yet approved for publication) * October 14, 2008: Edit and formatting pass by "Mike Gunderloy":credits.html#mgunderloy (not yet approved for publication) * October 12, 2008: First draft by "Akshay Surve":credits.html#asurve (not yet approved for publication) -- cgit v1.2.3 From 395f171141e50b99516d445198a44afc12bd65ea Mon Sep 17 00:00:00 2001 From: Jaime Iniesta Date: Sun, 4 Apr 2010 12:21:32 +0200 Subject: Fixed debugging guide to pass XHTML 1.0 Strict --- railties/guides/source/debugging_rails_applications.textile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/railties/guides/source/debugging_rails_applications.textile b/railties/guides/source/debugging_rails_applications.textile index cd0098d686..3eddf1a2b1 100644 --- a/railties/guides/source/debugging_rails_applications.textile +++ b/railties/guides/source/debugging_rails_applications.textile @@ -286,7 +286,7 @@ condition down finish list ps save thread var continue edit frame method putl set tmate where -TIP: To view the help menu for any command use +help + in active debug mode. For example: _+help var+_ +TIP: To view the help menu for any command use +help <command-name>+ in active debug mode. For example: _+help var+_ The next command to learn is one of the most useful: +list+. You can also abbreviate ruby-debug commands by supplying just enough letters to distinguish them from other commands, so you can also use +l+ for the +list+ command. @@ -704,6 +704,7 @@ h3. Changelog "Lighthouse ticket":http://rails.lighthouseapp.com/projects/16213-rails-guides/tickets/5 +* April 4, 2010: Fixed document to validate XHTML 1.0 Strict. "Jaime Iniesta":credits.html#jaimeiniesta * November 3, 2008: Accepted for publication. Added RJS, memory leaks and plugins chapters by "Emilio Tagua":credits.html#miloops * October 19, 2008: Copy editing pass by "Mike Gunderloy":credits.html#mgunderloy * September 16, 2008: initial version by "Emilio Tagua":credits.html#miloops -- cgit v1.2.3 From 532f1fe07522a2f60db75c72f71778b8b0c4f81f Mon Sep 17 00:00:00 2001 From: Jaime Iniesta Date: Sun, 4 Apr 2010 12:29:25 +0200 Subject: Move credits pic to new assets/image folder --- railties/guides/assets/images/jaimeiniesta.jpg | Bin 0 -> 11913 bytes railties/guides/images/jaimeiniesta.jpg | Bin 11913 -> 0 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 railties/guides/assets/images/jaimeiniesta.jpg delete mode 100644 railties/guides/images/jaimeiniesta.jpg diff --git a/railties/guides/assets/images/jaimeiniesta.jpg b/railties/guides/assets/images/jaimeiniesta.jpg new file mode 100644 index 0000000000..445f048d92 Binary files /dev/null and b/railties/guides/assets/images/jaimeiniesta.jpg differ diff --git a/railties/guides/images/jaimeiniesta.jpg b/railties/guides/images/jaimeiniesta.jpg deleted file mode 100644 index 445f048d92..0000000000 Binary files a/railties/guides/images/jaimeiniesta.jpg and /dev/null differ -- cgit v1.2.3 From 62fd691a7a5c90b5a56b5b8be399482fdd89928e Mon Sep 17 00:00:00 2001 From: Jaime Iniesta Date: Sun, 4 Apr 2010 12:33:28 +0200 Subject: Fix XHTML on performance guide --- railties/guides/source/performance_testing.textile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/railties/guides/source/performance_testing.textile b/railties/guides/source/performance_testing.textile index 5c760a5966..154dbbbbe6 100644 --- a/railties/guides/source/performance_testing.textile +++ b/railties/guides/source/performance_testing.textile @@ -330,7 +330,7 @@ h5. Apply the Patch h5. Configure and Install -The following will install ruby in your home directory's +/rubygc+ directory. Make sure to replace ++ with a full patch to your actual home directory. +The following will install ruby in your home directory's +/rubygc+ directory. Make sure to replace +<homedir>+ with a full patch to your actual home directory. [lifo@null ruby-version]$ ./configure --prefix=//rubygc -- cgit v1.2.3 From a6dc000158e806c1e82ee4af5e5c2e43e5f0493f Mon Sep 17 00:00:00 2001 From: Jaime Iniesta Date: Sun, 4 Apr 2010 12:43:19 +0200 Subject: Replace
 by ,  and  on plugins guide; making
 it validate XHTML 1.0 Strict

---
 railties/guides/source/plugins.textile | 29 +++++++++++++++--------------
 1 file changed, 15 insertions(+), 14 deletions(-)

diff --git a/railties/guides/source/plugins.textile b/railties/guides/source/plugins.textile
index 2db421aa91..74c8ee2df9 100644
--- a/railties/guides/source/plugins.textile
+++ b/railties/guides/source/plugins.textile
@@ -35,14 +35,14 @@ h4. Create the Basic Application
 
 The examples in this guide require that you have a working rails application.  To create a simple rails app execute:
 
-
+
 gem install rails
 rails yaffle_guide
 cd yaffle_guide
 rails generate scaffold bird name:string
 rake db:migrate
 rails server
-
+
Then navigate to http://localhost:3000/birds. Make sure you have a functioning rails app before continuing. @@ -56,22 +56,22 @@ Rails ships with a plugin generator which creates a basic plugin skeleton. Pass This creates a plugin in 'vendor/plugins' including an 'init.rb' and 'README' as well as standard 'lib', 'task', and 'test' directories. Examples: -
+
 rails generate plugin yaffle
 rails generate plugin yaffle --with-generator
-
+ To get more detailed help on the plugin generator, type +rails generate plugin+. Later on this guide will describe how to work with generators, so go ahead and generate your plugin with the +--with-generator+ option now: -
+
 rails generate plugin yaffle --with-generator
-
+ You should see the following output: -
+
 create  vendor/plugins/yaffle/lib
 create  vendor/plugins/yaffle/tasks
 create  vendor/plugins/yaffle/test
@@ -89,20 +89,20 @@ create  vendor/plugins/yaffle/generators/yaffle
 create  vendor/plugins/yaffle/generators/yaffle/templates
 create  vendor/plugins/yaffle/generators/yaffle/yaffle_generator.rb
 create  vendor/plugins/yaffle/generators/yaffle/USAGE
-
+ h4. Organize Your Files To make it easy to organize your files and to make the plugin more compatible with GemPlugins, start out by altering your file system to look like this: -
+
 |-- lib
 |   |-- yaffle
 |   `-- yaffle.rb
 `-- rails
     |
     `-- init.rb
-
+ *vendor/plugins/yaffle/init.rb* @@ -124,7 +124,7 @@ h4. Test Setup *vendor/plugins/yaffle/test/database.yml:* -
+
 sqlite:
   :adapter: sqlite
   :dbfile: vendor/plugins/yaffle/test/yaffle_plugin.sqlite.db
@@ -146,7 +146,7 @@ mysql:
   :username: root
   :password: password
   :database: yaffle_plugin_test
-
+ For this guide you'll need 2 tables/models, Hickwalls and Wickwalls, so add the following: @@ -239,10 +239,10 @@ end To run this, go to the plugin directory and run +rake+: -
+
 cd vendor/plugins/yaffle
 rake
-
+ You should see output like: @@ -1511,4 +1511,5 @@ h3. Changelog "Lighthouse ticket":http://rails.lighthouseapp.com/projects/16213/tickets/32-update-plugins-guide +* April 4, 2010: Fixed document to validate XHTML 1.0 Strict. "Jaime Iniesta":credits.html#jaimeiniesta * November 17, 2008: Major revision by Jeff Dean -- cgit v1.2.3 From b352b97ff590f0db27432a8a4d3df3c632780b52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Sun, 4 Apr 2010 03:47:49 -0700 Subject: No .DS_Store on .gitignore. Text editor files should be ignored in your ~/.gitignore. --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index 9c3207049f..16bffc157b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ -.DS_Store *.gem pkg .bundle -- cgit v1.2.3 From 7d7e0627a0490b6b4ddb0ee5429264ccd46f1245 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Sun, 4 Apr 2010 08:42:54 -0700 Subject: fixes duplicate element IDs in some guides --- railties/guides/rails_guides/generator.rb | 2 +- railties/guides/source/action_view_overview.textile | 2 +- railties/guides/source/active_support_core_extensions.textile | 6 +++--- railties/guides/source/form_helpers.textile | 2 +- railties/guides/source/performance_testing.textile | 6 +++--- railties/guides/source/routing.textile | 6 +++--- railties/guides/source/security.textile | 10 +++++----- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/railties/guides/rails_guides/generator.rb b/railties/guides/rails_guides/generator.rb index b8c1913819..f577182f5f 100644 --- a/railties/guides/rails_guides/generator.rb +++ b/railties/guides/rails_guides/generator.rb @@ -227,7 +227,7 @@ module RailsGuides anchors = Set.new html.scan(/ 'person', :object => @person -h5. select +h5(#prototype-select). select Returns a collection reference by finding it through a CSS pattern in the DOM. diff --git a/railties/guides/source/active_support_core_extensions.textile b/railties/guides/source/active_support_core_extensions.textile index a8410a8dd2..b41b16b728 100644 --- a/railties/guides/source/active_support_core_extensions.textile +++ b/railties/guides/source/active_support_core_extensions.textile @@ -866,7 +866,7 @@ WARNING: Note that in that case +parent+ returns +Object+. NOTE: Defined in +active_support/core_ext/module/introspection.rb+. -h5. +parents+ +h5(#module-parents). +parents+ The method +parents+ calls +parent+ on the receiver and upwards until +Object+ is reached. The chain is returned in an array, from bottom to top: @@ -2191,9 +2191,9 @@ NOTE: Defined in +active_support/core_ext/array/grouping.rb+. h3. Extensions to +Hash+ -h4. Conversions +h4(#hash-conversions). Conversions -h5. +to_xml+ +h5(#hash-to-xml). +to_xml+ The method +to_xml+ returns a string containing an XML representation of its receiver: diff --git a/railties/guides/source/form_helpers.textile b/railties/guides/source/form_helpers.textile index d33bb4b4ff..fe0f8f1ac9 100644 --- a/railties/guides/source/form_helpers.textile +++ b/railties/guides/source/form_helpers.textile @@ -501,7 +501,7 @@ Date.civil(params[:start_date][:year].to_i, params[:start_date][:month].to_i, pa The +:prefix+ option is the key used to retrieve the hash of date components from the +params+ hash. Here it was set to +start_date+, if omitted it will default to +date+. -h4. Model Object Helpers +h4(#select-model-object-helpers). Model Object Helpers +select_date+ does not work well with forms that update or create Active Record objects as Active Record expects each element of the +params+ hash to correspond to one attribute. The model object helpers for dates and times submit parameters with special names, when Active Record sees parameters with such names it knows they must be combined with the other parameters and given to a constructor appropriate to the column type. For example: diff --git a/railties/guides/source/performance_testing.textile b/railties/guides/source/performance_testing.textile index 154dbbbbe6..f74b68b0ef 100644 --- a/railties/guides/source/performance_testing.textile +++ b/railties/guides/source/performance_testing.textile @@ -213,11 +213,11 @@ h4. Understanding the Output Performance tests generate different outputs inside +tmp/performance+ directory depending on their mode and metric. -h5. Benchmarking +h5(#output-benchmarking). Benchmarking In benchmarking mode, performance tests generate two types of outputs: -h6. Command Line +h6(#output-command-line). Command Line This is the primary form of output in benchmarking mode. Example: @@ -258,7 +258,7 @@ measurement,created_at,app,rails,ruby,platform 0.00771250000000012,2009-01-09T15:46:03Z,,2.3.0.master.859e150,ruby-1.8.6.110,i686-darwin9.0.0 -h5. Profiling +h5(#output-profiling). Profiling In profiling mode, you can choose from four types of output. diff --git a/railties/guides/source/routing.textile b/railties/guides/source/routing.textile index 6625412684..0cf8c45761 100644 --- a/railties/guides/source/routing.textile +++ b/railties/guides/source/routing.textile @@ -65,7 +65,7 @@ RESTful routes take advantage of the built-in REST orientation of Rails to wrap resources :books -h4. Named Routes +h4(#quick-tour-named-routes). Named Routes Named routes give you very readable links in your code, as well as handling incoming requests. Here's a typical named route: @@ -91,7 +91,7 @@ resources :assemblies do end -h4. Regular Routes +h4(#quick-tour-regular-routes). Regular Routes In many applications, you'll also see non-RESTful routing, which explicitly connects the parts of a URL to a particular action. For example, @@ -400,7 +400,7 @@ In addition to the routes for magazines, this declaration will also create route This will also create routing helpers such as +magazine_ads_url+ and +edit_magazine_ad_path+. -h5. Using +:name_prefix+ +h5(#nested-name-prefix). Using +:name_prefix+ The +:name_prefix+ option overrides the automatically-generated prefix in nested route helpers. For example, diff --git a/railties/guides/source/security.textile b/railties/guides/source/security.textile index b62ff8cb38..1ddf094d18 100644 --- a/railties/guides/source/security.textile +++ b/railties/guides/source/security.textile @@ -611,7 +611,7 @@ h4. SQL Injection -- _Thanks to clever methods, this is hardly a problem in most Rails applications. However, this is a very devastating and common attack in web applications, so it is important to understand the problem._ -h5. Introduction +h5(#sql-injection-introduction). Introduction SQL injection attacks aim at influencing database queries by manipulating web application parameters. A popular goal of SQL injection attacks is to bypass authorization. Another goal is to carry out data manipulation or reading arbitrary data. Here is an example of how not to use user input data in a query: @@ -668,7 +668,7 @@ The result won't be a list of projects (because there is no project with an empt Also, the second query renames some columns with the AS statement so that the web application displays the values from the user table. Be sure to update your Rails "to at least 2.1.1":http://www.rorsecurity.info/2008/09/08/sql-injection-issue-in-limit-and-offset-parameter/. -h5. Countermeasures +h5(#sql-injection-countermeasures). Countermeasures Ruby on Rails has a built in filter for special SQL characters, which will escape ' , " , NULL character and line breaks. Using +Model.find(id)+ or +Model.find_by_some thing(something)+ automatically applies this countermeasure. But in SQL fragments, especially in conditions fragments (+:conditions => "..."+), the +connection.execute()+ or +Model.find_by_sql()+ methods, it has to be applied manually. @@ -760,7 +760,7 @@ http://www.cbsnews.com/stories/2002/02/15/weather_local/main501644.shtml?zipcode