Prevents further modifications to obj. A
returning String.new do |item| item << user.first_name item << user.second_name if user.second_name item << user.family_name end
Take a look at the definition of this method:
def returning(value) yield(value) value end
3. Layout and content_for
Real good with rails.
Eighth book of Rails-style: layout and content_for
4. Text_field_tag and f.text_field
They exist separately in the action_view helpers in form_tag_helper.rb and form_helper.rb.
form_helper which should be said that the helper method used to generate a more suitable target active_record associated with the form, because a lot of the convenience convention.
Form_tag_helper using the form to generate a higher degree of freedom.
In any case, to avoid conflict of namespace.
When you send a message to an object, the object executes the first method it finds on its
Sham This is the machinist in the way of implementation. It should be noted that, if you want to capture are the class method, so you want to define a method self.method_missing.
class A VALUE = A.new // it will fail because when run this line, class A is not yet loaded. This is quite different with Java. end
8. Rspec describe
Eric asked me, rspec test describe XXXController what effect? After reading the source code in this way would have been written to test the spec of the sub-class category. Then it is one of the public methods you can call you.
9. Load_path, require, load, include
load_path the equivalent of java's class path
require the equivalent of java and load the import, but the load of each document will load conditions, and require only one load.
Does include for mixin.