Displaying 20 results from an estimated 216 matches for "application_helpers".
Did you mean:
application_helper
2005 Jul 22
3
testing application_helper.rb
I am trying to run some functional (or are they unit?) tests on my
application_helper.rb. So far, I''ve not had any success in being able
to call the methods defined in application_helper.rb.
Here is my app/test/functional/helpers.rb
require File.dirname(__FILE__) + ''/../test_helper''
require File.dirname(__FILE__) +
2006 Mar 04
2
application_helper can "include" another helper ?
My "application_helper.rb" become to large.
I have basic functions that I use for all projects.
Is it possible to define thoses functions inside an external
"basic_helper.rb" and include it in "application_helper.rb" ?
2006 Nov 27
2
ActionMailer & application_helper.rb
Hi,
I''m trying to send some emails with the same formatting as my pages & I
can''t seem to access my display routines in application_helper.rb. I''m
trying a hack to bypass this.
At the top of my ActionMailer notifier script I''ve included
application_helper.rb - my understanding is that this should arrive as a
module and should be able to be used
2006 Jun 26
5
using application_helper.rb
I have a simple Yes/No selection list that I am using in a number of
places. Thinking that I could DRY things out a bit, I added it to
application_helper.rb ...
YES_NO = [
[ "Yes", true ],
[ "No", false ]
].freeze
So I figured I would use it there instead of in each model.rb where
needed.
anyway, in webrick screen, I am continually seeing this...
2008 May 20
2
DateHelpers .. don' display.. ?
HI
I don''t understand what happen ..
if I use the script/console :
>> include ActionView::Helpers::DateHelper
=> Object
>> include GLoc
=> Object
>> time_ago_in_words(Time.now, include_seconds = false)
=> "moins d''une minute"
I get the correct answer..
but I I write in my view
<%= time_ago_in_words(Time.now, include_seconds = false)
2005 Dec 19
1
Application.rb / Application_Helper.rb / DRY help
Hi all,
I have defined the following method in both application.rb and
application_helper.rb:
def still_logged_in?
!session[:user_id].nil?
end
This method is called in a before_filter in my application.rb, as well
as in my layout/application.rhtml and view/user/login.rhtml (for
showing a login / logout button, etc.)
I had to put it both places, otherwise I would get an
2005 Aug 16
1
Best way to access constants in application_helper.rb from views?
Hi,
I''m using the application_helper.rb file to create some useful functions
for generating links by name.
I understand that functions defined in this file are available to all
views, but what about constants defined in that module? Is there a
best practice approach for doing this other than accessing each constant
via ApplicationHelper::FOO?
Stu
2011 Apr 08
5
How to extend a helper using plugin?
Hello,
I''m facing this problem while trying to extend the parse_redmine_links
helper method in Redmine-1.1.0 (Rails-2.3.5) from my plugin.
My idea is to use alias_method_chain so the extended version could
call the original version and adjust the result to it''s liking.
Anything I''ve tried so far exposes this behavior: the first render of
a page uses the extended
2006 Jan 16
5
A function that return a link_to, Possible ?
Hello, I try this :
in application_helper.rb
-----------------------
def lnk bla
return link_to bla, { :controller => bli , :action => "blo" , :id
=> "blu" }
end
in file.rhtml
-----------
<%= lnk "yo!" %>
This return an error. There is a way to do this or something similar, or
this is completly impossible ?
Thanks
2007 Jul 31
11
helper spec not finding rails core helpers
...ule ApplicationHelper
def app_foo
t = Time.now
distance_of_time_in_words( t, t + 50.minutes)
return true
end
end
# application_helper_spec.rb
require File.dirname(__FILE__) + ''/../spec_helper''
describe ApplicationHelper do
it "should find app_foo in application_helpers.rb" do
app_foo.should be_true
end
end
# error output
NoMethodError in ''ApplicationHelper should find app_foo in
application_helpers.rb''
undefined method `distance_of_time_in_words'' for [Dynamically
generated class for RSpec example]:#<Class:0x32d11c8&...
2006 Aug 13
0
application_helpers, gems and paypal
Hi I''m trying to use the paypal ipn gem in my app but rails can''t seem
to find it. I installed using gems and it is listed as being installed.
I followed the documenation and put include Paypal::Helpers in my
application_helpers.rb but as soonas i try to use <%= paypal_form_tag
%> i get
undefined local variable or method `paypal_form_tag'' for
#<#<Class:0xb76ffa40>:0xb76ff964>
Extracted source (around line #24):
23:
24: <%= paypal_form_tag %>
Is there something else i have to do i...
2006 Jun 07
0
Problem with file_column plugin path and application_helper.rb
Hello,
I upgraded my Rails app from 1.0 to 1.1.2. Basically everything worked
on my development box. When I uploaded the changes (including the
frozen 1.1.2 gems) to my webhost most things worked. However I had a
problem with my application_helper.rb file. It wasn''t able to find the
url_for_image_column method from the file_column plugin. Here''s the
relevant code in
2006 Feb 26
0
ActionMailer view templates don''t pick up application_helper.rb?
It seems that helper methods defined in application_helper.rb aren''t
available in ActionMailer views.
Is that intentional?
--
- Adam
** Expert Technical Project and Business Management
**** System Performance Analysis and Architecture
****** [ http://www.everylastounce.com ]
[ http://www.aquick.org/blog ] ............ Blog
[ http://www.adamfields.com/resume.html ].. Experience
[
2010 Nov 29
0
[TDD] [Rails] - Rspec test for application_helper.rb fails when trying to access application_controller method.
In a method named logo in my application helper, I reference an application controller method (current_account) that has been marked as a helper method with the following syntax:
helper_method :current_account
When I test out the setup in the browser (without rspec), rails is happy with this setup.
However, when I run the spec, the spec won''t pass and gives me the following error:
2006 Jan 31
6
How to Affect Plugin Load Order
I''m using bundled_resource, login_engine, and a few other plugins. It
appears Rails considers plugins in alphabetic order. Turns out that
there is a particular order that will work and alphabetic ain''t it.
The login engine must be loaded first. Bundled resource then includes
''application_helper'' and the application helper includes LoginEngine. If
2006 Mar 16
1
application_helper.rb vs application.rb
I find that I want to put the same methods into both of these files.
Whats the best way to get away with a single implemenation?
Gareth
--
Posted via http://www.ruby-forum.com/.
2009 Jul 24
2
[PATCH server] add collapsable sections to vm form
the vm form is getting cluttered, this patch simply add
collapsable sections to the form, making the 'storage'
and 'network' sections collapsed by default
credit goes to jayg for contributing alot to
this patch in terms of simplification and cleanup
---
src/app/helpers/application_helper.rb | 4 +-
src/app/views/vm/_form.rhtml | 35 ++++++++++++++++++++++----------
2006 May 24
3
using a helper from the console
I''ve got a couple of helper functions in my application_helper file that
I would like to run from the console (for debugging).
What is the correct way to invoke a helper from the console?
_Kevin
--
Posted with http://DevLists.com. Sign up and save your mailbox.
2006 Feb 11
7
Menu Helper
Hi all,
I''m trying to add a common menu to all pages in my application. It is
just a set of links I want to display. I''m having trouble deciding
where to put the code. Below is what I''ve tried to get out of the "Four
Days on Rails" tutorial but no luck. Any help would be appreciated. Am
I on the right track?
Thanks,
Sam
2009 Jul 02
1
[PATCH server] UI for accumulated uptime for VMs. (revised)
This revised version of the patch incorporates jguidditta's sorting fix as well as some other changes required to make this work fully on the cloud UI side.
---
src/app/controllers/pool_controller.rb | 2 +-
src/app/controllers/resources_controller.rb | 4 +++-
src/app/controllers/smart_pools_controller.rb | 5 ++---
src/app/helpers/application_helper.rb | 14