Commit Graph

8149 Commits

Author SHA1 Message Date
Vijay Dev
9d06b49913 Merge branch 'master' of github.com:lifo/docrails
Conflicts:
	railties/guides/source/getting_started.textile
2012-03-17 20:30:08 +05:30
Egor Homakov
bf94f1cab7 using pluck 2012-03-17 07:05:38 +01:00
Mike Mulvaney
f820098f9e Moved squawk method into LocalInstanceMethods module, so it would
not be added to every ActiveRecord::Base object.  Changed acts_as_yaffle
so it will include the LocalInstanceMethods module.  Now only
models that call acts_as_yaffle will get the squawk method, instead
of pushing them into every ActiveRecord::Base.
2012-03-16 15:53:16 -04:00
Mike Mulvaney
2dd486ceb5 Changed unit tests so they refer to yaffle_test_field as symbol.
acts_as_yaffle expects a symbol, so the string was causing the tests
to always fail.
2012-03-16 15:50:53 -04:00
Carlos Antonio da Silva
a1c77e7d94 Add missing quotes on AS::Notifications examples 2012-03-15 09:41:28 -03:00
adman65
18e1b5b8c5 [ci skip] Add examples of subscribing & creating ActiveSupport::Notifications 2012-03-15 10:27:04 +01:00
adman65
2784e6433b [ci skip] Add examples to instrumentation guide 2012-03-15 10:08:16 +01:00
José Valim
fbc9d0f44f Simplify helpers handling. Ensure Metal can run AC hooks. 2012-03-15 08:48:38 +01:00
Ryan Bigg
b5e2518ddb [getting started] [ci skip] Fix incongruant use of 'we' and 'you'. Expand upon creating posts section 2012-03-14 23:47:39 -07:00
Ryan Bigg
9c3d0029e5 [getting started] Round out 'Laying down the ground work' section 2012-03-14 19:32:13 -07:00
Ryan Bigg
7ea1755998 [getting started] rename initial 'meat' section of guide to 'Laying down the ground work'
This section involves a medium amount of setup and explanation (for the end user's own good!). It's not really about creating a post... that's for the *next* section
2012-03-14 19:31:52 -07:00
Ryan Bigg
507dba67c4 [getting started] correct typo in welcome/index.html.erb template path 2012-03-14 19:30:57 -07:00
Ryan Bigg
75aa3dccb3 [getting started] Improve explanation around initial controller generator usage 2012-03-14 18:51:48 -07:00
Ryan Bigg
605f4267bc [getting started] remove indentation for get 'posts/new' 2012-03-14 18:49:52 -07:00
José Valim
e1824c5991 Remove remaining http_only? calls. 2012-03-14 22:58:32 +01:00
Ryan Bigg
7dabf57f9e [getting started] Reworking beginnings of the 'meat' of the guide
This guide will now create the new action first, then the create action and so on and so forth until the controller has all seven RESTful actions.

We are doing this to demonstrate to a user how to *properly* build a controller. We do not mention scaffold *ON PURPOSE*. Scaffold is evil. We want to show the users the different facets of creating a resource, and this is how we're going to do it.
2012-03-14 14:34:50 -07:00
Ryan Bigg
35e0cb51f8 [getting started] Default root route in config/routes.rb is for a welcome controller. Let's make it easy by creating a WelcomeController, not a HomeController, in the guide 2012-03-14 14:33:16 -07:00
Ryan Bigg
66e5e7136d [getting started] add warning that guide is being worked on (just for edge) 2012-03-14 14:32:31 -07:00
José Valim
6db930cb5b Remove --http. 2012-03-14 22:30:01 +01:00
Ryan Bigg
c71b9612c0 [getting started] Link to Bundler website when explaining Gemfile[.lock] 2012-03-14 12:02:52 -07:00
Ryan Bigg
4c1861f427 [getting started] Improve prose for initial routing section 2012-03-14 12:00:54 -07:00
Ryan Bigg
f7a3771744 [getting started] mention generators early on, when rails new is mentioned.
This is to show one of the 'wins' of Rails nice and early. More are demonstrated as we flow through the guide.
2012-03-14 12:00:32 -07:00
Ryan Bigg
329db6ff6c [getting started] briefly explain what a controller and view are 2012-03-14 11:51:29 -07:00
Ryan Bigg
7b2bd23b29 [getting started] more line lengthening 2012-03-14 11:45:16 -07:00
Ryan Bigg
58bf4c45ec [getting started] fix lines that are too short.
This should be a configuration setting on your text editor, rather than hard-coded into the guide
2012-03-14 11:34:37 -07:00
Ryan Bigg
5013f51348 [getting started] update Rails version to 3.2.2 2012-03-14 11:34:37 -07:00
Ryan Bigg
5cbdd0f667 [getting started] *THE* way to install Rails is by running +gem install+. You should not run this as the root user. 2012-03-14 11:34:37 -07:00
Ryan Bigg
2f06c94e38 [getting started] Remove super-early mention of REST from Getting Started guide.
We will mention this as we introduce the routing components for Rails later on in the guide.
2012-03-14 11:34:37 -07:00
Ryan Bigg
dcfb990e1b Move database configuration section from Getting Started Guide into Configuration guide
This is because newbies don't need to know immediately all the different ways of configuring a database on Rails. The default is SQLite3 which'll work on most operating systems by default. The only reason for it to *not* work is due to missing packages on the operating system, which should be taken care of in some sort of 'Installing Rails for <Operating System> guide.
2012-03-14 11:34:36 -07:00
Carlos Antonio da Silva
2963ee6b4b Fix scaffold controller template, ensure rake scaffold test pass by default 2012-03-14 14:47:20 -03:00
José Valim
da07433578 Update railties/guides/source/api_app.textile 2012-03-14 16:53:43 +01:00
Carlos Antonio da Silva
96aea58f22 Do not generate app/views and sprockets entries on http app
[Carlos Antonio da Silva & Santiago Pastorino]
2012-03-14 12:46:25 -03:00
Carlos Antonio da Silva
570cc89bad Generate special controller and functional test templates for http apps
The main goal is to not generate the format.html block in scaffold
controller, and to generate a different functional test as we don't rely
on redirects anymore, we should test for http responses.

In addition to that, the :edit action is removed from the http
controller and the edit route is not generated by default, as they
usually do not make sense in this scenario.

[Carlos Antonio da Silva & Santiago Pastorino]
2012-03-14 12:46:25 -03:00
Carlos Antonio da Silva
3e138df977 Rename http-only app generator option to http
[Carlos Antonio da Silva & Santiago Pastorino]
2012-03-14 12:46:24 -03:00
Carlos Antonio da Silva
2c0f6b0d8a Move http only option to AppGenerator
[Carlos Antonio da Silva & Santiago Pastorino]
2012-03-14 12:46:24 -03:00
Carlos Antonio da Silva
7f3847cc14 Add test to ensure setting config.generators.http_only actually disables the generator options
[Carlos Antonio da Silva & Santiago Pastorino]
2012-03-14 12:46:24 -03:00
Carlos Antonio da Silva
ff8e9e07b4 Allow generator configs from http_only! to be overriden by app
[Carlos Antonio da Silva & Santiago Pastorino]
2012-03-14 12:46:24 -03:00
Carlos Antonio da Silva
2b355757d5 Remove duplicated tests from shared generator
[Carlos Antonio da Silva & Santiago Pastorino]
2012-03-14 12:46:24 -03:00
Carlos Antonio da Silva
858a30e571 Refactor http_only, remove reader method
[Carlos Antonio da Silva & Santiago Pastorino]
2012-03-14 12:46:24 -03:00
Carlos Antonio da Silva
219ff43639 Disable template, helper and assets options when using http_only!
[Carlos Antonio da Silva & Santiago Pastorino]
2012-03-14 12:46:24 -03:00
Carlos Antonio da Silva
c825e9a5ea Create generators http_only! setup and hide some common namespaces for now
[Carlos Antonio da Silva & Santiago Pastorino]
2012-03-14 12:46:24 -03:00
Carlos Antonio da Silva
124838b508 Generate middleware http_only! config when running http only app generator
[Carlos Antonio da Silva & Santiago Pastorino]
2012-03-14 12:46:23 -03:00
Carlos Antonio da Silva
5c8c7ca2f9 Add http-only option to Rails app generator
Change application controller template accordingly, to inherit from
ActionController::HTTP and not generate protect_from_forgery call.

[Carlos Antonio da Silva & Santiago Pastorino]
2012-03-14 12:46:23 -03:00
Santiago Pastorino
4c16791f35 Add ActionController::HTTP
More info http://edgeguides.rubyonrails.org/api_app.html

[Carlos Antonio da Silva & Santiago Pastorino]
2012-03-14 12:46:23 -03:00
Rafael Mendonça França
1ced5ca67b Remove key_value helper now that master is 1.9 only and we always use
the 1.9 hash syntax in the generators.
2012-03-13 23:10:32 -03:00
José Valim
ec22a2b813 Update API guide with latest decisions. 2012-03-14 00:30:42 +01:00
Piotr Sarnacki
5520e36e48 [engines guide] Add information about running and reverting specified migrations [skip ci] 2012-03-14 00:29:07 +01:00
Carlos Antonio da Silva
dde3058c3a Expand changelog and upgrading rails guide with IdentityMap info 2012-03-13 20:08:55 -03:00
Carlos Antonio da Silva
a8dd21d8b4 Remove IdentityMap 2012-03-13 20:08:54 -03:00
Guillermo Iguaran
e823c8bd6f Add sprockets-rails to generated Gemfile. This should be reverted after sprockets-rails release on rubygems 2012-03-13 18:06:45 -05:00