Displaying 20 results from an estimated 825 matches for "actionviews".
Did you mean:
actionview
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 crashes Ruby.
Same with render(:file => ''template.rhtml'')
Why is this?
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 need any central
source
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
2009 May 22
1
rails 2.3.2, active scaffold, nested, ActionView::TemplateError (undefined method `format_column' for #<ActionView::Base:
Before I dig in any further (since I have no idea where to go from
here...)
Has anyone been succcessful with 2.3.2, AS, and nested scaffolds?
I have the latest of AS and the render_component 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|
...
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>
I''d like to get something like:
<select
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 ?
I wrote the following code in my form view :
<li><label for="email">Email</label>
<%= form.text_field :email, :size => "30" %>
<span id=''email_error'' class=\''warning-text warning-text-indent\''><%=
@user.errors.on(:email) %></span></li>
the generated html code is the following :
<span
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
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
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
In my User form I have standard field to get user record attributes
(first_name, last_name and email)
I also have a select drop_down to choose a role from an array
first_name, last_name and email are user record attributes, but I
defined the role name as a virtual attribute
validates_presence_of :email, :last_name
attr_accessor :role_name
validates_presence_of :role_name, :if
=>
2008 Mar 06
1
Unitialized constant ActionView::Helpers::TagHelper::Set
Hi all,
I write the following test to a simple plugin
require ''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
.
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
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 =>
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 available to a
descendant of
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.
--
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 from it, send an email to
2006 Jan 22
2
Using register_template_handler to serve CSS files (Making ActionView handle .css as .rhtml)
Hi,
I wanted to be able to use some Rails code inside CSS files, so I set up
a controller (StylesController) to serve CSS files that reside inside
the controller''s view folder when the browser requests /stylesheets/:action
So in the controller I just define empty actions with the names I want
my style sheets in (ie: def cooleffects end - that would respond to
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