Jay Pignata
8ef1cd9733
Enhancing distance_of_time_in_words to prefix year output with over and about depending upon how many months have elapsed
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#3106 state:committed]
2009-09-28 14:36:38 +13:00
Jeremy Kemper
0bd6e933c0
Restore split between require-time and runtime load path mungery. Simplifies vendor requires.
2009-09-24 18:38:18 -07:00
Joshua Peek
542ddde5d4
Move helpers specific to functional tests out of TestProcess into AC::TestCase
2009-09-23 23:03:24 -05:00
Joshua Peek
f5ace625fe
Ensure changes to I18n locale get reset during tests
2009-09-19 13:22:09 -05:00
Joshua Peek
b2f0b8cbda
Rollback AS bundler work and improve activation of vendored dependencies
2009-09-13 22:55:46 -05:00
Joshua Peek
213c920e4f
Define weblog controller for url helper test
2009-09-13 17:28:44 -05:00
Andrew France
1b78e9bba3
Allow fields_for on a nested_attributes association to accept an explicit collection to be used. [ #2648 state:resolved]
...
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com >
2009-09-12 15:50:05 +02:00
Joshua Peek
c531bd6665
Cleanup hacky routing with controller_path in url helper tests. This doesn't work in real life anyway.
2009-09-06 22:29:29 -05:00
Sam Pohlenz
4b6321efa9
Don't raise exceptions for missing javascript_include_tag or stylesheet_link_tag sources unless the :cache or :concat options are given. [ #2738 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2009-09-03 14:01:01 -05:00
Yehuda Katz + Carl Lerche
f3fc5c4b5f
Refactor ActionView::Resolver
2009-09-03 11:18:57 -07:00
Akira Matsuda
cc9af20da7
I18n: use I18n for select helpers' prompt text
...
[#2252 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-26 13:55:57 -07:00
Jeremy Kemper
a7ca5595a2
Revert "I18n: use I18n for select helpers' prompt text"
...
Broke CI.
[#2252 state:open]
This reverts commit adedf72821 .
2009-08-26 12:12:40 -07:00
Akira Matsuda
adedf72821
I18n: use I18n for select helpers' prompt text
...
[#2252 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-26 11:29:16 -07:00
Yehuda Katz
1310231c15
Got tests to pass with some more changes.
...
* request.formats is much simpler now
* For XHRs or Accept headers with a single item, we use the Accept header
* For other requests, we use params[:format] or fallback to HTML
* This is primarily to work around the fact that browsers provide completely
broken Accept headers, so we have to whitelist the few cases we can
specifically isolate and treat other requests as coming from the browser
* For APIs, we can support single-item Accept headers, which disambiguates
from the browsers
* Requests to an action that only has an XML template from the browser will
no longer find the template. This worked previously because most browsers
provide a catch-all */*, but this was mostly accidental behavior. If you
want to serve XML, either use the :xml format in links, or explicitly
specify the XML template: render "template.xml".
2009-08-15 12:32:02 -07:00
Yehuda Katz
9f5cd0156a
More cleanup of ActionView and reduction in need for blocks in some cases:
...
* only one of partial_name or :as will be available as a local
* `object` is removed
* Simplify _layout_for in most cases.
* Remove <% render :partial do |args| %>
* <% render :partial do %> still works fine
2009-08-15 12:32:01 -07:00
Yehuda Katz
27adcd1c1a
Clean up ActionView some:
...
* Call _evaluate_assigns_and_ivars at the two entry points so we don't have to
do a check at every render.
* Make template.render viable without having to go through a wrapper method
* Remove old TemplateHandler#render(template, local_assigns) path so we don't have
to set self.template every time we render a template.
* Move Template rescuing code to Template#render so it gets caught every time.
* Pull in some tests from Pratik that test render @object in ActionView
2009-08-15 12:32:01 -07:00
codeape
8c32248acb
Introduce grouped_collection_select helper.
...
[#1249 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 23:58:43 -07:00
Max Lapshin
0af4b0755f
Make sure link_to generates the form with the specified :href if any [ #2254 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-10 00:58:40 +01:00
Matt Duncan
920ef4e6f3
Fixed to_label_tag to accept id attribute without changing for attribute [ #2660 status:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2009-08-09 23:54:21 +01:00
Jeremy Kemper
c2f9c42719
Fix that RedCloth shouldn't be required to run tests
2009-08-09 11:02:34 -07:00
rizwanreza
7dbb2b6f83
Support passing Redcloth options via textilize helper [ #2973 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-09 16:41:09 +01:00
Yehuda Katz
e28e061165
Use response_body rather than performed?
2009-08-09 04:12:09 -03:00
Michael Koziarski
370bf1401a
Don't call additional methods on builders passed to the atom_feed helper.
...
Additionally, actually test that the atom_feed helper works with :xml as an option.
[#1836 state:committed]
2009-08-09 13:10:08 +12:00
rizwanreza
5786395760
Allow content_tag options to take an array [ #1741 state:resolved] [rizwanreza, Nick Quaranto]
...
Example:
content_tag('p', "limelight", :class => ["song", "play"])
# => <p class="song play">limelight</p>
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-08 22:21:32 +01:00
José Valim
c34d6279a0
Allow radio buttons to work with booleans.
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-08 18:02:07 +01:00
rizwanreza
1191e3ffaf
Add :include_blank option for select_tag [ #1987 status:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-08 17:58:27 +01:00
wmoxam
98450fd168
Fix number_to_precision rounding error [ #2071 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-08 02:05:10 +01:00
Matthew Rudy Jacobs
64268a0b06
Make sure javascript_include_tag/stylesheet_link_tag does not append ".js" or ".css" onto external urls [ #1664 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-05 15:58:55 +01:00
Marc Love
d860c89170
Fix tag helpers so that all HTML element boolean attributes render according to the specs. Added all boolean attributes listed in the XHTML 1.0 specs ( http://www.w3.org/TR/xhtml1/guidelines.html ) and HTML 5 specs ( http://www.whatwg.org/specs/web-apps/current-work ). HTML 5 boolean attribute rendering was broken in commit 1e2d722960 / [ #2864 state:resolved].
...
Signed-off-by: Yehuda Katz <wycats@gmail.com >
2009-07-30 09:48:27 -07:00
Yehuda Katz
c4d1075bd3
Add support for error_messages_for(@obj)
2009-07-28 19:06:14 -07:00
Joshua Peek
92c00d7586
AMo conversion helper
2009-07-21 00:51:57 -05:00
Yehuda Katz
f2f5cdc8bc
Rename ActiveRecordHelper to ActiveModelHelper
2009-07-20 01:30:49 +09:00
Yehuda Katz
b00cac4adc
Finish convert_to_object updates
2009-07-20 01:22:24 +09:00
Yehuda Katz
13e18dd940
Update some tests and add a to_model to form helpers
2009-07-20 00:58:59 +09:00
Yehuda Katz
5ffaaa71d1
Define ActiveModel API Compliance
...
- Define to_model on AR
- Define to_model on ActiveModel::APICompliant
- Update test fixtures to be API Compliant
- Start using to_model in AP
2009-07-20 00:27:04 +09:00
Yehuda Katz
b20d68446d
Move default_form_builder to ActionView so it'll work in environments not using ActionView::Base
2009-07-19 22:31:55 +09:00
Yehuda Katz
0f2914be40
Separate ActionView::Context so something else can easily be made into an AV context
2009-07-19 22:31:44 +09:00
Emilio Tagua
1e2d722960
Adds a audio_tag helper for the HTML5 audio tag. Fixed video_path docs. HTML attributes values should be true or false not attribute's name. [ #2864 state:resolved]
...
Signed-off-by: Yehuda Katz <wycats@yehuda-katzs-macbookpro41.local >
2009-07-07 15:56:27 -07:00
Jarl Friis
e61afed6f8
My suggestion to fix ticket 2401 [ #2401 state:resolved]
...
Signed-off-by: Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com >
2009-07-02 11:55:24 -07:00
Yehuda Katz + Carl Lerche
cf5b2b250f
Fixes a number of tests that inexplicably didn't fail when we committed the original patch
2009-07-02 10:50:25 -07:00
Tieg Zaharia
51d7b3070c
Adds a video_tag helper for the HTML5 video tag (similar to how the image_tag works) (tests included); removes a duplicate test line for image_tag; adds boolean attributes for video tag to tag()'s boolean attributes
...
Signed-off-by: Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com >
2009-07-02 10:36:38 -07:00
Chris Mear
085db5e128
Make text_area_tag escape contents by default.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#2015 state:committed]
2009-06-27 13:16:52 +12:00
Christos Zisopoulos
18a97a6601
Handle missing javascript/stylesheets assets by raising an exception
...
An exception will be raised if a local javascript/stylesheet file included
by the stylesheet_link_tag or javascript_include_tag can not be found.
When caching is enabled, we use atomic_write to ensure that the cache file
is not created with zero length.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#2738 state:committed]
2009-06-26 16:47:15 +12:00
Darragh Curran
9cb8c812f2
Add content_for?(:name) helper to check if content_for(:name) is present [ #1311 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-06-21 17:07:22 +01:00
Jeremy Kemper
5267addd4f
Use errors[field] instead of errors.on(field)
2009-06-17 19:37:56 -07:00
Yehuda Katz + Carl Lerche
65102c8f1a
Cleaning up more tests and code that needed to work in both old and new base
2009-06-17 16:51:51 -07:00
Yehuda Katz + Carl Lerche
d8f352e970
Rename ActionView::Template::Path ActionView::Resolver
2009-06-17 15:32:55 -07:00
Yehuda Katz + Carl Lerche
4fad953f90
Fixing pending tests and fixed some formats / partial rendering semantics
2009-06-17 12:54:19 -07:00
Joshua Peek
1c4d28ba31
Move model naming into ActiveModel
2009-06-17 10:37:39 -05:00
Joshua Peek
c50b03b754
Add :concat option to asset tag helpers to force concatenation.
...
This is useful for working around IE's stylesheet limit.
stylesheet_link_tag :all, :concat => true
2009-06-15 10:23:23 -05:00