similar to: Controller url_for modifies request object?

Displaying 20 results from an estimated 200 matches similar to: "Controller url_for modifies request object?"

2007 Nov 12
1
help debugging ActionMailer with restful_authentication?
In a nutshell, I''m using restful_authentication that emails the user when they sign up for an account The development.log file shows the body of the e-mail message being prepped to send out, but doesn''t show confirmation that it made it. When I use gmail''s SMTP server, a Rails exception is thrown because gmail expects an encrypted connection. A different type of Rails
2006 Nov 19
1
ActiveRecord save-update not performed ?
I try to understand the following issue : - when creating a new User record, I use an UserObserver to trap the before_save call back and send an email def after_create(user) UserNotifier.deliver_signup_notification(user) end - Once created a user can ask for a password reset, which is also trapped by the UserOberver def after_save(user) UserNotifier.deliver_reset_password(user) if
2008 Jun 19
2
quotes cause SQL havoc
Hi- I cannot seem to find an answer to this. I have a simple question with quotes- I want to allow apostrophes in a string in a model. I then want to allow searching on that field. In ActiveRecord, when I create a search using find, and say :conditions=> "title like ''%#{query}%'' or body like ''%#{query}%''" where query is the search string, I
2008 Mar 04
6
find_all_by deprecated?
Is find_all_by deprecated and/or find_first_by for 2.0.2? If not, what is actually deprecated? just find_all(..) and find_first()? Thanks for clearing this up. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to
2007 Nov 05
0
calling a method after deliver
Hi, I am trying to call a method after message is delivered via MyMailer.deliver_message. Is the below the same as this? MyMailer.deliver_message create_sent_record? class MyMailer < ActionMailer::Base def message( subject, body, recps, sent_at = Time.now) @subject =subject @body = body @recipients = recps @from =
2007 Aug 30
8
experimental rails story adapter in trunk
For those of you interested in getting a jump on learning about and using the new Story Runner in a Rails app, I''ve added an experimental Rails-Story adapter to trunk. You can see how to use it here: http://pastie.caboo.se/92320 This is PURELY EXPERIMENTAL, however it actually works and will likely not change much in the way that it does work. Happy hacking! David
2006 Jul 15
1
ActionMailer and PDF Attachment and corrupt file?
Community, I''m struggling with an issue and I''m sure it is trivial but I cannot find the solution. I''m trying to attach a PDF file to an email. For simplicity, I have explicitely named a given file but when I get the email, the attachment is only a partial of the document which causes it to be corrupt. Sample below: @recipients =
2007 May 13
2
ActionMailer outside of Rails?
Has anyone used ActionMailer outside of rails? I have a requirement for work that will not allow me to do this from within a rails app. I have successfully sent an email in the following manner: MyMailer.deliver_clever_email(someArg,''testing!'') where the second argument is the body of the email, but when I try to call just: MyMailer.deliver_clever_email(someAr) and use a
2011 Dec 12
1
Errno::ECONNREFUSED (Connection refused - connect(2)): sending email in production
I don''t know how to get more info about this issue on my remote server ( Linux/Debian6 - Qmail) localhost testing is fine , so my class UserMailer < ActionMailer::Base is rendering correctly the email ( checked in the development log) now, testing the remote SMTP server , via the production console, using : ActionMailer::Base.smtp_settings = {:address  =>
2006 Aug 12
1
url_for and :defaults
Hello, in my routes there are (just for testing): map.connect '':controller/:id/:action'', :defaults => {:action => ''alma''} in my controller: def alma render :text => url_for(:id => 123) end so I go to: http://localhost:3000/music/store which generates: http://localhost:3000/music/store/123/index Where the
2006 Jul 31
0
problems testing helpers - link_to and url_for don''t work...
So I''ve used the helper test plugin, and also tried some things from Rails Recipes, and basically neither seems to work for cases where a helper does anything related to link_to/url_for, and this includes calling named_routes. This is obviously an issue, as a common use for helpers is to refactoring something like this: <%= link_to "text that changes slightly", :id => id
2006 Jun 02
0
If you want to use url_for in lib scripts...
how would you do it? Joe -- Posted via http://www.ruby-forum.com/.
2006 Jun 09
0
disable escaping of ActionController::Base.url_for
Hi! I am trying to use rails for a wml/wap application. Submitting forms with wml goes something like that: <input type="text" name="search" value="" /> <a href="/portal?search=$(search)">goto</a> The wap browser replaces $(search) in the url with the text entered in the input field. Now to my problem. To use the routing information
2006 Jun 10
0
opposite of url_for()?
Hi, I have a string in a controller that represents a url for my website. For example the string might be /cont/act/id and I want to break this up using the routes defined in my config/routes.rb file so that I get a hash like {:controller => ''cont'', :act => ''act'', :id=>''id''} How can I access all of the information stored in
2006 Jun 19
0
url_for missing out parameters?
Having a bit of an issue with url_for The current page I''m on has a named route as follows: map.some_page ''page/:id/:range'', :action => ''the_action'' All looks fairly normal. I have an url_for on this page to make a link to another page as so: url_for(:controller=>''other'', :action=>''display'', :id=>5,
2006 Jun 21
0
url_for generating URLs without relative root
I''ve got an app that has ActionController::AbstractRequest.relative_url_root = "/super" set in environment.rb. I''d like to use url_for to generate URLs without the relative root, or even be able to specify a different relative root. Is that possible somehow? Pat
2006 Jun 24
1
DRY up link_to_remote and its url_for
In an attempt to provide a gracefully degradable link_to_remote, I repeat myself every time: <%= link_to_remote(''Signup'', {:url => {:controller => ''user'', :action => ''signup''}}, {:href => url_for(:controller => ''user'', :action => ''signup'')}) %> Looked around the RDoc &
2006 Apr 11
0
url_for - results inconsistency ??
Hi all, I recently noticed something really weird in url_for results let''s say that we have something like this somewhere in code <pre> URL1:<%=url_for( {:action=>''foobar''}.merge({''action''=>''ohmy''}) )%> URL2:<%=url_for(
2006 Apr 13
1
url_for in email templates
Is there a way I can use url_for in an email template? When I try and use it it barks a no method error. Thanks, Nicholas P. Mueller
2006 Apr 16
0
automatic URI encoding on url_for?
I am trying to store a hash in a URL so that a search query can be stored as a link. Here is my code: link_to(''blah'', url_for({:controller => ''search'', :action => ''advanced'', :query => @query, :page => n}) @query is the hash I''m trying to