Commit Graph

7327 Commits

Author SHA1 Message Date
Joshua Peek
ce5d958f8f Do not stat template files in production mode before rendering. You will no longer be able to modify templates in production mode without restarting the server 2008-07-05 18:35:52 -05:00
Joshua Peek
f22ae15a8e Use the inline template's hash as a method key instead of relying on a counter 2008-07-05 17:49:49 -05:00
Joshua Peek
5a3bc6f12f Removed unused template_args variable 2008-07-05 17:40:39 -05:00
Joshua Peek
27f382641c Deprecated TemplateHandler line offset 2008-07-05 17:31:57 -05:00
Joshua Peek
cd6fe83152 Ensure all complied method names are cleaned up in the error backtrace 2008-07-05 16:34:51 -05:00
Joshua Peek
39ba2da82b Moved complied method name logic into Renderable 2008-07-05 16:27:43 -05:00
Joshua Peek
1dcc59121b Renamed Renderer to Renderable 2008-07-05 12:05:50 -05:00
Jeremy Kemper
271f5b655f Fix rdoc for Filters::ClassMethods 2008-07-04 12:51:16 -07:00
Pratik Naik
cb645c8877 Use ActiveSupport::TimeZone in time:zones rake tasks 2008-07-04 20:07:00 +01:00
Michael Koziarski
c3aaba0180 Simplify the implementation of assert_redirected_to to normalise the urls before comparing. Also allows for a simpler implementation of redirect_to without most of the recursion.
Also allows for assert_redirected_to @some_record
2008-07-04 10:41:40 +03:00
Michael Koziarski
db58391079 Remove old broken follow_redirect from functional tests. Still works in integration tests.
The follow_redirect in functional tests only worked if you used redirect_to :id=>foo, :action=>bar, rather than named routes.
2008-07-04 10:41:40 +03:00
Michael Koziarski
51e13d51ad Move test related core_ext stuff out of regular core ext to prevent nasty surprises when you require active_support then use Test::Unit directly. 2008-07-04 10:41:39 +03:00
Joshua Peek
01637796d7 Revert "Moved TemplateHandlers to Base"
This reverts commit 42d215a925.

Conflicts:

	actionpack/lib/action_view/inline_template.rb
	actionpack/lib/action_view/template.rb
2008-07-03 21:09:37 -05:00
josevalim
bad1eac91d Allow caches_action to accept cache store options. [#416 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-07-04 02:00:51 +01:00
David Lowenfels
87fbcaa622 Add :tokenizer option to validates_length_of. [#507 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-07-04 01:31:39 +01:00
miloops
570f5aad66 Allow date helpers to ignore date hidden field tags. [#503 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-07-04 01:06:22 +01:00
Joshua Peek
1a478923dc Reduce the number of callsites for new TemplateFiles 2008-07-03 14:01:45 -05:00
Joshua Peek
8a442e0d57 Extracted Template rendering logic into Renderer module 2008-07-03 13:06:00 -05:00
Joshua Peek
7d5c8505f5 Use render on InlineTemplate 2008-07-03 12:50:43 -05:00
Joshua Peek
b6f89a8bf5 Don't rely on view instance logger 2008-07-03 12:49:54 -05:00
Joshua Peek
42d215a925 Moved TemplateHandlers to Base 2008-07-03 12:48:00 -05:00
Michael Koziarski
75e04b5295 Tighten the rescue clause when dealing with invalid instance variable names in form_helper. 2008-07-03 19:43:20 +03:00
Michael Koziarski
d79cde37ea Move the file exists checks outside write_asset_file_contents.
This lets us avoid the relatively costly trip through compute_*_paths if the file already exists.
2008-07-03 19:43:14 +03:00
Michael Koziarski
12cf8f348b Move template_format logic out to the request so it's alongside the 'regular' request format.
Use xhr? instead of the expensive trip through Request#accepts.
2008-07-03 19:43:06 +03:00
Michael Koziarski
dc2d754d60 Support for custom annotations with rake notes:custom and DRY up the task definition.
e.g.  rake notes:custom ANNOTATION=WTF
2008-07-03 19:42:58 +03:00
Michael Koziarski
7098143f07 Remove unused local_binding option to InstanceTag's Constructor 2008-07-03 19:26:56 +03:00
Michael Koziarski
5dd10d60bb Remove nested ternary operators from select_year in favour of conditionals. 2008-07-03 19:26:56 +03:00
Michael Koziarski
df36a6f759 Remove unneeded ObjectWrapper class.
Was previously needed to work around the semantics of a deprecated (now removed) API to render :partial
2008-07-03 19:26:56 +03:00
Michael Koziarski
efd18066a2 Tighten the rescue clause here to prevent hiding strange mock related errors behind the line offset test 2008-07-03 19:21:04 +03:00
Michael Koziarski
e358b1fce8 Remove old method of including javascripts define_javascript_functions.
javascript_include_tag and friends do a much better job.
2008-07-03 19:21:04 +03:00
Michael Koziarski
5501166dec Remove strange alias for JavaScriptHelper 2008-07-03 19:20:47 +03:00
Tarmo Tänav
a37d065f85 Use :namespace instead of :path_prefix for finding controller. [#544 state:resolved]
:namespace is supposed to be the module where controller exists.
:path_prefix can contain anything, including variables, which
makes it unsuitable for determining the module for a controller.

Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-07-03 16:11:50 +01:00
Lucas Carlson
d20e8dd220 Changing order of equality because comparing certain objects with false raises an error.
>> require 'md5'
=> true
>> MD5.new("Asds") == false
TypeError: can't convert false into String
	from (irb):2:in `=='
	from (irb):2
>> false == MD5.new("Asds")
=> false
2008-07-02 21:24:48 -07:00
Joshua Peek
3b3790a435 Deprecate :use_full_path render option. The supplying the option no longer has an effect. 2008-07-02 21:38:58 -05:00
Joshua Peek
6c0edef26e Added Rails.initialized? flag 2008-07-02 21:29:57 -05:00
Mike Subelsky
8f640c381d Added application/jsonrequest as a synonym for application/json
[#536 state:resolved]
2008-07-02 11:39:42 -07:00
rick
a4138d4632 use mocha for TimeZone mocking in Form Options helper tests 2008-07-02 11:09:10 -07:00
Ricardo Santos
820992c98f Ensure script/plugin unsource 'Usage' text is correct. [#526 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-07-02 17:47:19 +01:00
Pratik Naik
267d3964eb Make sure render :collection doesnt set nil local when :as is absent 2008-07-02 17:19:41 +01:00
Pratik Naik
2b43620e3c Add :as option to render a collection of partials with a custom local variable name. [#509 state:resolved] [Simon Jefford, Pratik Naik] 2008-07-02 16:40:42 +01:00
Pratik Naik
4f75840d72 Add Inflection rules for String#humanize. [#535 state:resolved] [dcmanges]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-07-02 13:25:36 +01:00
Tim Pope
3a95ee73cf Make rake test:uncommitted work with Git.
Note : rake test:uncommitted is considering only unstaged files.

Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-07-02 05:21:59 +01:00
Tim Haines
f5052dd8a3 Make sure render :template works with :locals. [#524 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-07-02 04:30:34 +01:00
Joshua Peek
aff2d33172 Improved test coverage and added RackRequest support for CGI environment variables. 2008-07-01 21:53:55 -05:00
Carl Porth
a81f16af31 Ensure Rails::Generator quotes file names while generating diff. [#264 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-07-02 03:28:02 +01:00
Pratik Naik
474d425382 Ensure AssociationCollection#size considers all unsaved record. [#305 state:resolved] [sds]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-07-02 03:17:33 +01:00
Scott Stewart
7378e23734 Ensure proper output when submit_tag is used with :disabled_with. [#388 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-07-02 01:39:30 +01:00
gbuesing
6f1d827096 TimeWithZone#advance: treat :weeks option as variable-length 2008-06-29 15:28:34 -05:00
gbuesing
676d6a6514 TimeWithZone: when crossing DST boundary, treat Durations of days, months or years as variable-length, and all other values as absolute length. A time + 24.hours will advance exactly 24 hours, but a time + 1.day will advance 23-25 hours, depending on the day. Ensure consistent behavior across all advancing methods. 2008-06-29 15:21:40 -05:00
rick
01db5ded54 Merge branch 'state_machine'
Some big changes:
  * Added some redundant requires so active_support/inflecto can be loaded
    without the rest of ActiveSupport.
  * Disabled callbacks and validations until they are added and tested.
  * Converted specs back to tests, using ActiveSupport::TestCase and the new
    #test helper.
  * As an experiment, I imported Scott Barron's awesome AASM gem into
    ActiveModel.  I added multiple state machine support and vastly improved
    the API (no more aasm_* prefixes).  All the old tests pass.  If this bothers
    people, I have no problems removing this and contributing the changes back to
    AASM.  I just feel like AMo is a better spot for all these 'modelish' features.
2008-06-29 12:13:58 -07:00