similar to: testing Helpers

Displaying 20 results from an estimated 500 matches similar to: "testing Helpers"

2006 Jan 12
0
testing
I''m looking for a good way to make all of Rails'' inbuilt helpers available to my custom Helper while I''m testing it. The Helper I''m testing is EditorHelper. EditorHelper itself relies on some of Rails'' inbuilt Helpers, such as JavaScriptHelper and UrlHelper. These are automagically available when called on within an ERB template, but not when called by
2010 Sep 11
0
Rails 3 helper method not called
While I was trying to port one application from Rail 2 to Rails 3 I''ve noticed that helper methods used for rewriting URL paths are not called. Methods are defined in app/helpers/url_helper.rb: module UrlHelper def story_pah(story) "/story/#{story.title}" end end This method, when called inside of view instead of: story/1 creates path story/story_title. I order to
2005 Dec 15
6
passing parameters to link_to OR better way to do this?
Hi All: I''m writing my 1st Rails app and I can''t seem to find the answer on the web or in the book. I''m making a table, and I want to be able to expand a filename. The code is basically as as follows below. In the last <td> entry, I want to call an action and pass in the test_results_path, which I will go and read a file and munge the data for a separate
2005 Nov 18
10
[Request] file_column configurability
I wasn''t sure where to email this request, so I am hoping the author of file_column actually sees this. I was wondering if there were any plans to allow some configurability in the file_column plugin. By configurability I mean allowing the developer to define which table column is used as the unique identifier when creating image folders. Right now it seems like it uses the ID of the
2006 Feb 03
6
Rails from the command line
I have controller that processes data in one table and puts results in another. Now that its'' working, I would like to be able to run it from the command line ( read: windows batch file). How can this be done? It will be installed on a Windows box with InstantRails1.0, (if that matters). I will be doing more processes like this, so this is a good opportunity to get it right. -- Best
2006 Nov 24
0
Strange "camelize" error when running fresh rails install on Hoary
Hi everyone, Just wondering if anyone had seen this before. I did a simple install following Paul Goscicki''s tutorial (http://paulgoscicki.com/archives/2005/09/ruby-on-rails-on-ubuntu/) and I get this message when I type "rails test" from the command line.(I''m running Ubuntu 5.04 Hoary) could anyone point me in the right direction? thanks. --max
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 Feb 04
3
I just can''t figure it out !
Howdy RailsWarriors, Its probably dead easy but I don''t see it. Got this in my controller. def new_computer User.find(params[:id]).computers.create(:comp => ''New Comp:'') end Which with an .rjs template creates a div at the bottom of my list. This all works like a charm. But in the partial I load in my rjs I also have a button for ''delete'' in the
2006 Feb 27
0
Mapping '':action/:id/:controller/'' doesn''t work
Hello People, (I am not good at ROR yet. This post could be very lame.) I am going playing with routes.rb. Well, pretty much any combination of mapping works, a part from: map.connect '':action/:id/:controller/'' In this case, the request is routed; however, I get: --------------------------------------- Showing app/views/inputs/start.rhtml where line #8 raised: No url can be
2007 Apr 07
1
Undefined Method 'rewrite' when calling link_to
Whenever I try to pass an options hash to the link_to method (or url_for, or button_to) I get this error: undefined method `rewrite'' for []:ActionController::Routing::PathSegment::Result The trace ends with /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/action_controller/base.rb:522:in `url_for''
2016 Jul 17
0
firewalld cloud-init dhcp error
Dear members, Please tell me what's wrong. After setig firewalld, I got fail on cloud-init with reboot. The server is rebooted, but I cannot access from internet. Before reboot I can access form internet. And before setig firewalld, there's no problem on reboot. /var/log/cloud-init.log shows following Jul 17 14:18:46 biz105 cloud-init: ci-info: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!Route info
2005 Dec 23
10
Extending model
Hi, I''m looking for a way to extend one of my models to allow some level of abstraction between what goes into it and how it is stored. For example, say I have a Product and I want to set it''s price. A person using the website will type the price in euros. Internally, I''d like to store the price as an integer value of cents. I can currently do this with some ugly code
2007 Aug 30
1
alias_method_chain stack level too deep in Rake test only
I have an odd error. I have the following module: module ActionController module SslSupport def self.included(base) raise "#{base} does not define url_for" unless base.method_defined?(:url_for) unless base.respond_to?(:url_for_without_ssl_supprt) base.send :include, InstanceMethods base.send :alias_method_chain, :url_for, :ssl_support end
2007 Sep 20
1
undefined method `request' for "products":String ?
Since updated edge yesturday i have had a series of errors related to undefinded methods for "products":String. I do have these controllers namespaced. ==== Errors example 1: undefined method `request'' for "products":String Extracted source (around line #2): view: <tbody> <%= render :partial => ''admin/products/product'',
2006 Jan 30
2
:condition not being applied
I am using acts_as_taggable and everything seems to be working except that :condition => "tags_resources.portal_id=#{portal_id}" is not being applied. @resource_pages = Paginator.new self, Resource.find_tagged_with(:any => tag, :condition => "tags_resources.portal_id=#{portal_id}").length, 25, @params[''page'']; @resources
2006 Mar 12
2
Strange error: undefined method `rewrite''
Hi, when I generate a new rails project with a simple scaffolded controller, I get a strange error message, whenever it tries to call the url_for method, for example: ,---- | undefined method `rewrite'' for #<Url:0xb7675e64> | | Extracted source (around line #7): | | 4: </p> | 5: <% end %> | 6: | 7: <%= link_to ''Edit'', :action =>
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. --
2006 May 21
6
Is there a way to call helper methods in a controller?
Hi, Is there a way to call helper methods in a controller? I want to do something like this in my controller Class MyController < Action.... def my_method string = link_to "some_url", :controller => "home", :action => "command" end end link_to is an ActionView helper method and it seems that I couldn''t access the method in the controller
2006 May 11
3
can''t call link_to from within a model class
can anyone tell me how to call link_to from within a model class? I''m trying to do something like the following: validates_uniqueness_of :email, :message => "address has already been taken. If you''ve forgotten your password, please click " + link_to(''here'', :action => ''forgot_password'', :controller =>
2009 Jan 06
1
How to access text helper and url helper methods in model
Hi, I want to access TextHelper and UrlHelper methods in my model so how i am able to access it ? I was included following helper in my model but still it is not working? also for accessing these helper method w need to give external reference? E.g. class Xyz include ActionView::Helpers::TextHelper include ActionView::Helpers::UrlHelper Also