Displaying 20 results from an estimated 825 matches for "actionview".
Did you mean:
action_view
2006 Jul 14
7
Using ActionView free style
ActionView is a very useful class, in its own right. But, calling it by
itself causes a weird crash, exiting Ruby, without even raising an
exception!
ruby script/runner "begin; av = ActionView::Base.new; av.render(:inline
=> ''Hi!''); rescue => e; puts e; end"
just crashe...
2006 Mar 12
0
ERB and Builder template engines shouldn''t be so heavily wired in ActionView::Base
Problem:
1. ERB and Builder template engines are heavily wired in ActionView::Base
2. Should be optional. If we use different engine - why load all their
stuff if not needed?
3. There are template engines which expect files in their own locations
and cache them in their own way. For instance a template engine may
store templates in a database. These engines don''t n...
2006 Sep 04
1
Overriding ActionView::Helpers::InstanceTag::DEFAULT_TEXT_AREA_OPTIONS
What is the best way to override some of the FormHelper default
options? Right now I''m adding this to the beginning of my
environment.rb:
ActionView::Helpers::InstanceTag::DEFAULT_TEXT_AREA_OPTIONS = { "cols"
=> 80, "rows" => 5 }
Is that the way it''s supposed to be done?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby...
2009 May 22
1
rails 2.3.2, active scaffold, nested, ActionView::TemplateError (undefined method `format_column' for #<ActionView::Base:
...nt plugin via
% script/plugin install --force git://github.com/lackac/render_component.git
-r rails-edge
I have an AS user_controller:
active_scaffold :user do |config|
...
config.nested.add_link("Portfolios",[:portfolios])
end
But when I click on the Portfolios link I get:
ActionView::TemplateError (undefined method `format_column'' for
#<ActionView::Base:0xb67cee38>) on line #28 of vendor/plugins/
active_scaffold/frontends/default/views/_nested.rhtml:
format_column is defined in:
.../vendor/plugins/active_scaffold/lib/helpers/list_column_helpers.rb
which is inc...
2006 Feb 10
2
How do I test actionview helpers in the console?
I would like to see the output of actionview helper methods, to be able
to play with it.
When I do the following in the console:
collection_select("job", "client_id" , @clients, "id", "name")
I get:
NoMethodError: undefined method `collection_select'' for
#<Object:0xb7cf1970>...
2013 Feb 28
1
Make `ActionView::Helpers::InstanceTag#tag_id`, `ActionView::Helpers::InstanceTag#tag_id_with_index(index)` public?
As I asked in StackOverflow<http://stackoverflow.com/questions/15127658/hoe-to-get-tag-id-from-a-record-in-form-for/15129741>
I think it would be helpful since we can dynamically create javascript code
to control each input tag in form helper, what do you think? Or there has
already been a solution?
--
You received this message because you are subscribed to the Google Groups "Ruby
2009 Jun 28
2
validation error messages in Form - how to disable the ActionView::Base.field_error_proc ?
...quot; name="user[email]"
id="user_email"/>
<span warning-text-indent\="" class="\''warning-text"
id="email_error">should look like an email address.is too short
(minimum is 6 characters)</span>
is there any way to disable the ActionView::Base.field_error_proc in
the config file ?
2009 Sep 24
2
Calling ActionView from uninheriting class
Hi Gurus, I have a class, specified in models cart.rb, which doesn''t
inherit from anything--it''s just a container
class Cart
...
I just discovered I can''t call number_to_currency in that class. Any
idea how to "include" it in my code? I tried
ActionView.number_to_currency without luck. I could kill a few lines
of non-DRY regexp code in cart.rb if I could just use
number_to_currency.
Many TIA,
Craig
2009 Jul 24
7
number_to_currency not working since 2.1.1
Back in 2.1.1 everything was sweet:
Loading development environment (Rails 2.3.3)
>> include ActionView::Helpers::NumberHelper
=> Object
>> number_to_currency(12.3)
>> "$12.30"
Then I upgraded to 2.3.2 and:
Loading development environment (Rails 2.3.3)
>> include ActionView::Helpers::NumberHelper
=> Object
>> number_to_currency(12.3)
>> 12.3
Woops! Let...
2006 Jun 02
6
overriding constants
Hi there,
I''m trying to override the defaults for form_helper.
I can see in action_view/helpers/form_helper.rb:
class InstanceTag #:nodoc:
include Helpers::TagHelper
attr_reader :method_name, :object_name
DEFAULT_FIELD_OPTIONS = { "size" => 30 }.freeze unless const_defined?(:DEFAULT_FIELD_OPTIONS)
DEFAULT_RADIO_OPTIONS = { }.freeze
2008 Jul 06
1
ActionView::Base.field_error_proc not getting an error field
...tes_presence_of :email, :last_name
attr_accessor :role_name
validates_presence_of :role_name, :if
=> :role_name_required?, :message => ''must be selected''
when testing with a blank form, I get all errors detected during User
model validation, which is fine...
BUT
ActionView::Base.field_error_proc doesn''t get the role_name error, so
I cannot change the style of the select
I checked it , debugging the proc :
ActionView::Base.field_error_proc = Proc.new do |html_tag, instance|
debugger
..
I just get the html_tag for email and last_name, never for
role_name...
2008 Mar 06
1
Unitialized constant ActionView::Helpers::TagHelper::Set
...uire ''rubygems''
require ''test/unit''
require File.dirname(__FILE__) + ''/../lib/meta_tags''
require ''action_view/helpers/tag_helper''
class MetaTagsTest < Test::Unit::TestCase
include MetaTagHelper
include ActionView::Helpers::TagHelper
. . .
end
and when I run rake in the root plugin directory I get the following
error
/usr/bin/ruby18 -Ilib:lib
"/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake/rake_test_loader.rb"
"test/meta_tags_test.rb"
/usr/lib/ruby/gems/1.8/gems/actionpack-2...
2008 Dec 08
2
undefined method 'render_file' for class 'ActionView::Base'
I need some help with SimpleLog
I have SimpleLog running at HostingRails.
I want to develope and test new themes stuff on my local system.
I getting the error from actionview_ex.rb:12
undefined method ''render_file'' for class ''ActionView::Base''
I am at:
Ruby: 1.8.6
Rails 2.2.2
gem: 1.3.1
rake: 0.8.3
I am a new rails/merb/ruby developer. I think I am on the wrong version
of ActionView . Need to freeze at some version but cannot find...
2008 Dec 18
2
Render a view from console
Hello!
In my application I''m trying to render a view from a class in /lib
folder. I have found that it''s very similar to render a view from
console. So, I have tried different methods:
>> string = ActionView::Base.new.render( :inline => ''works'', :layout => false )
=> "works"
>> string = ActionView::Base.new.render( :template => ''contr/index'', :layout => false )
=> nil
>> string = ActionView::Base.new.render( :controller => &...
2006 May 23
3
image_tag problem
Hiall,
I want to make an image_tag from within a controller in order to be
able to present a link (with a status image) in a view. Here is my
controller method (in file webca_controller.rb, hence WebcaController)
def untouched_status_image_tag
image_tag("open", { :alt => "Offen", :title => "Offen", :size =>
"12x12", :class =>
2006 May 15
1
Simple: How to use TextHelper in a controller
I''m having trouble succesfully getting access to the
ActionView::Helpers::TextHelper.strip_tags
method from one of my controllers.
If I try to call it directly using
ActionView::Helpers::TextHelper.strip_tags
I get
undefined method `strip_tags'' for ActionView::Helpers::TextHelper:Module
What is the preferred way to make ActionView helpers availab...
2006 May 19
1
how to access ActionView::Helpers::JavaScriptHelper::escape_javascript in a model (a newbie question)
Hi all,
Please forgive me for this newbie question. But I really want to know how
how to access ActionView::Helpers::JavaScriptHelper::escape_javascript
method in a model.
I can access this method in view, but when call it in the model, it ends up
with undefined method.
It seems to me they are in different scope.
So what''s the best way to access view helper methods in model.
--
Many thanks...
2013 Jul 05
1
No ActionView module in Rails Edge API. Did they remove it from the framework?
I found that there is no ActionView module in
http://edgeapi.rubyonrails.org/
Did they remove it from the framework?
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails...
2006 Jan 22
2
Using register_template_handler to serve CSS files (Making ActionView handle .css as .rhtml)
...controller I just define empty actions with the names I want
my style sheets in (ie: def cooleffects end - that would respond to
/stylesheets/cooleffects).
And in views/styles I have cooleffects.css
Then, I tried the following (both inside the controller, and in a
plugin''s init.rb):
ActionView::Base.register_template_handler ''css'', ActionView::Base
Which doesn''t seem to have any effect, because Rails throws an error on
the CSS file (no matter if I comment the line above):
|No rhtml, rxml, or delegate template found for |<contents of the CSS file>
So,...
2010 Sep 23
1
undefined method `protect_against_forgery?' for #<ActionView
Hi guys
This is a pretty tricky one.
I get a "undefined method `protect_against_forgery?'' for
#<ActionView::Base:0x569a3d4>" error when trying to generate a partial
from ''outside'' the web site. I do this as I have a rake task that checks
for changes periodically in the background, and if it then sees a change
it rebuilds the partial and posts the result back to the user if he i...