similar to: Rails 3 helper method not called

Displaying 20 results from an estimated 900 matches similar to: "Rails 3 helper method not called"

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
2006 Jan 13
0
testing Helpers
[I''m reposting this. The subject wasnt complete and misleading in my initial post (''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
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
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 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 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
2009 Mar 28
2
Git and vendor/rails
This is really a git question but the problem is with rails using git and others may have come across the problem. I have a branch on my application''s git repository with edge rails as a subproject checked out into vendor/rails. this allows me to keep my application edge-compliant by checking out the branch (which creates the rails folder in vendor), pulling the latest edge rails and
2009 Jun 11
4
Using view helpers and route helpers in a model
Hi there, I am trying to get something working and its driving me crazy. I have been looking around for solutions to getting view helpers working in models and for the most part I find this solution. Add the following in the model you want to use them in include ActionView::Helpers::UrlHelper include ActionController::UrlWriter However, when I try something like
2005 Mar 02
2
form action in mail (actionmailer)
Hi everyone. : ) I meet problem when use form tag in actionmailer. (content-type is text/html, surely) I want to use form action in actionmailer''s view (.rhtml) for some reason. 1. I use start_form_tag helper method as normally, but how I can ? I did <%= start_form_tag :action => "http://myhostname/mycontroller/myaction" %> or <%= start_form_tag :action =>
2008 Jul 23
0
Link_to_remote object missing
Hello, I''m in troubles trying to use ''link_to_remote'' on Rails 2.1. Having this page: <h4>Editing project</h4> <% form_for(:project, :url => project_path(@project), :html => { :method => :put }) do |f| %> <p> Name <%= f.text_field :name %> Date <%= calendar_date_select :project, :target_date, :time =>
2007 Oct 01
0
View Spec - Misbehaving
I''m trying to write my first view spec; I''ve done some controller specs with integrated views, but thought that isolating the views for some of these tests might be nice. So I wrote this: > describe PlayerContainer, "show" do > > PARENT_ID = 12 > CHILD_NAME = ''Child Name'' > PARENT_NAME = ''Parent Name'' > >
2008 Oct 12
0
How to test with RSpec a Rails plugin using “link_to” and “current_page?”
I''m writing a Rails plugin that builds up a menu in a view. I''m using *link`_`to* to build the link and *current_page?* to set class="active" on the current page. I''ve *include*d *ActionView::Helpers::UrlHelper* so I can use *link`_`to*. To get *current`_`page?* working in the view, I''ve had to inherit the current class (apparently ActionView::Base)
2005 May 21
0
How can I get a post-Routing translated url_for?
Is there a way to ask the Route system what controller and action mapping will be used, given a hash containing :controller and :action? I am trying to generalize the case where there is a button bar (e.g. tabbed pages) having one image shown if you are presently visiting that page, and another shown if you are not presently visiting that page (e.g. an "active" and an
2006 Jan 12
3
url_for in tests
Hi there, I''ve added an extra bunch of testing features for doing in-browser testing with Selenium, and am having quite a time figuring out how to use url_for with having a controller object present. I''ve tried using ActionController::Base.url_for and ActionView::Helpers::UrlHelper.url_for but haven''t been able to get something that works. What I want to be able
2016 Jul 16
1
Problem with cloud-init on re-boot
When I re-boot my CentOS 7 machine I get lots of error/warning messages like the following: ------------------------------ Jan 1 14:39:04 alfred cloud-init: 2016-01-01 14:39:04,351 - url_helper.py[WARNING]: Calling 'http://169.254.169.254/2009-04-04/meta-data/instance-id' failed [2/120s]: unexpected error ['NoneType' object has no attribute 'status_code']