similar to: Better render_if_exists

Displaying 20 results from an estimated 4000 matches similar to: "Better render_if_exists"

2006 Jul 10
2
Polymorphic associations in reverse?
My app has an association that''s got me scratching my head. I have Users, and Images. A User has many Images. (Yes, another picture sharing app, but it''s for a small niche, and it doesn''t end in -r!) I would like to express a "Favorite" relationship between both Users to Users, and Users to Images. This seems like the opposite of the standard
2005 Dec 17
0
Re: ActionViewError in Depot App after Upgrading to 1.0
any ideas someone? 2005/12/16, Torsten Schmidt <torstello-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>: > > Hi @all, > > i''ve upgraded rails to 1.0 and my depot-app (from Agile Web book). It > causes an error, when i try to call the admin/ship method. All other methods > works as expected. > > Calling the url in webrick: > > 127.0.0.1 - -
2006 Nov 04
0
traits-0.9.2 - better living through metaprogramming
URLS http://rubyforge.org/projects/codeforpeople/ http://codeforpeople.com/lib/ruby/traits ABOUT traits.rb is set of attr_* like methods on steroids, caffeine, and botox. it encourages better living through meta-programming and uniform access priciples. traits.rb supports smart inheritence of class attributes and a fistful of hooks for veryifying and munging attr values.
2005 Dec 18
3
undefined local variable in partial
i can''t get rid of the following error: ActionView::TemplateError (undefined local variable or method `order_line'' for #<#<Class:0xb75b2090>:0xb75b1f28>) on line #13 of app/views/admin/_order_line.rhtml: 10: 11: <tr valign="top"> 12: <td> 13: <div class="olnamebox"><%= h(order_line.name) %></div> 14:
2006 Aug 01
2
actionmailer cant find template in backgroundrb
Im trying to send mails from a backgroundrb worker and it seems like ActionView cant find my template. same code works as a rake task. here my worker: class StatusMailWorker < BackgrounDRb::Rails repeat 1.minutes # <-- hehe! def do_work(args) [...blah...] NotificationMailer.create_daily_report(users, rep, items) end end end its throwing the following error: No
2005 Dec 21
2
Missing error page templates
Whenever I get any errors on my application, I don''t get the regular rails error page with all the debugging information. What could''ve cause this? This is from the logs: ActionView::ActionViewError (No rhtml, rxml, rjs or delegate template found for /usr/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/templates/rescues/template_error.rhtml):
2006 May 24
1
ActionMailer (Action Mailer) Template not found? Help!!
I have been going around on the Internet about this all day and found absolutely nothing that seems to fit this problem. I have a mailer named "Notifier" -- in fact I have been using the EXACT code from the "Agile Development With Rails" chapter on "Sending E-Mail", pp. 411-416, except for my names (mailer named "Notifier", emailer method named
2006 May 30
2
No rhtml, rxml, rjs... problem with Action Mailer, again
Hi all I have seen a lot of people writing my same problem but I haven''t found the solution yet. This is the problem: "ActionView::ActionViewError in Periodico#index No rhtml, rxml, rjs or delegate template found for..." when trying to send email through action mailer. I have created the Notifier.rb model (in app/models/ folder) def signupthanks(user) # Email
2006 Mar 09
1
ActionMailer Question -- can''t find email templates
I have a PageController that displays a form. The form is just straight HTML, I only used the form helpers for the form tag as so: -- <%= form_tag({:action => :send_request}, {:method=>:post, :name=>''childsplay''})%> -- In my page controller I have this: -- def send_request email = InfoMailer::deliver_sendrequest(params) end --- in my action mailer class I
2005 Dec 16
0
Error in Depot App after Upgrading to 1.0
Hi @all, i''ve upgraded rails to 1.0 and my depot-app (from Agile Web book). It causes an error, when i try to call the admin/ship method. All other methods works as expected. Calling the url in webrick: 127.0.0.1 - - [16/Dec/2005:17:35:58 CET] "GET /admin/ship HTTP/1.1" 500 0 http://localhost:3000/admin -> /admin/ship i get the following error and a blank page in the
2005 Oct 10
0
[BUG ??] 'uses_component_template_root' problems with implementation in component
Hi all, I hope this will reach those that can help or change things, IF it is a bug/''feature'' issue. At least it seems like it to a newbie like me. BACKGROUND:: I have a basic html file in [ /app/views/layouts/application.rhtml ] that contains this <html> <%= render ''shared/header'' %> </html I then have a component [
2005 Oct 02
1
rendering if template exists
Hi folks, I have a component on my site called RelatedController. I intend to put some links and content related with the current page (controller and action). What I want to do is for the time being is render :partial "#{@current_controller}_#{@current_action}" Then in the component template root I have templates like _products_index _products_cart etc. I have decided to put
2007 Dec 08
6
Rails 2.0 ActionMailer breaks my redmine render_message
I am using ''redmine'' (v 0.6) as my major project manager, seems running fine w Rails 2.0 (slight modifs for paginations..) but I am stuck with a major error when sending a confirmation email : mailer.rb class Mailer < ActionMailer::Base .... # Renders a message with the corresponding layout def render_message(method_name, body) layout =
2008 Mar 04
2
Action Mailer throwing underscores on template name
I''ve recently run into a problem with one of my applications that refuses to send emails using ActionMailer. Looking at the log, it become obvious what''s happening, the system is looking for templates with underscores at the end. Notice the exception_notification_ . For example: ActionView::ActionViewError (No rhtml, rxml, rjs or delegate template found for
2005 Aug 21
0
Patch for Element.Class - wrong regexp
Hello, I noticed (due to a recent post by Martin Honnen to clp) that Element.Class uses wrong regexps for its operations. E.g., Element.Class.has() will find "classA" in "classA-foobar" I also changed the interface of .has() to the more general one used in .has_any() --- util.js.old 2005-08-21 19:18:40.000000000 +0200 +++ util.js 2005-08-21 19:31:42.000000000 +0200 @@
2005 Nov 09
1
Element.removeClassName(..) - bug or incorrect usage?
Hi, I have just started using prototype.js and scriptaculous.js in one of my projects. These libraries are awesome and they let me do so much more, so easily. At some point in my web interface, I have an element with multiple classes, out of which one class needs to be removed. I am using Element.removeClassName(element, "classname to remove"); to achieve this. This call does remove
2005 Sep 25
2
Preventing/allowing exceptions to occur in Element.add/remove ClassName
Hello everyone ! Thomas asked me to discuss here the behavior of Element.addClassName, as relating to ticker #2232 [1]. In HEAD, if the element passed-in to Element.addClassName does not exist, an exception is thrown, and script execution stops there. I believe this is inconsistent with other functions: Object.extend(Element, { hasClassName: function(element, className) { element =
2009 Sep 24
1
R v2.10.0: Doc clarification for cross references and where are we heading?
Hi, in 'Writing R Extensions" of R v2.10.0, under Section 'Cross-references' (2009-09-07) it says: 1. "The markup \link{foo} (usually in the combination \code{\link{foo}}) produces a hyperlink to the help for foo. Here foo is a topic, that is the argument of \alias markup in another Rd file (possibly in another package)." 2. "You can specify a link to a different
2024 Mar 11
1
R6 "classname" and generator name
I'm writing some code that does a bit of introspection of R6 classes and am wondering about the "classname" parameter. Its the first parameter to the "R6Class" class generator generator function, and the few examples I've looked at on CRAN set it the same as the name of the generator function, for example, from the docs: Queue <- R6Class("Queue", .....)
2006 Aug 07
9
problems with ActionMailer
Hi all, I''m trying to create a worker to send a mail to all the users in my db. Right now I''m doing the tests, this is the code in my worker (Masivo is the ActionMailer subclass): def do_work(args) @progress = 0 @logger.info("MAILER: starting job") records = Record.find(:all) total = records.size records.each_with_index do |record, idx|