similar to: Sharing RJS Templates

Displaying 20 results from an estimated 3000 matches similar to: "Sharing RJS Templates"

2006 Apr 28
0
RE: Rails Digest, Vol 19, Issue 784
I am having a bit of trouble with the error. I hava a product and category table and wanting to display the categories in a drop down list. Below is the error I get. Any suggestion on how I can fix this. undefined method `name'' for #<Category:0x3652448> 9: <select name="product[category_id]"> 10: <% @categories.each do |category| %> 11:
2006 Apr 08
2
Cannot use view helpers in RJS helpers
Any ideas why I would get an error in a RJS helper on view helpers such as number_to_currency. Example: # my_template.rjs page.help_me # my_helper for my_controller def help_me number_to_currency(10) end I have also tired page.number_to_currency but that doesn''t work either. Cheers, Nicholas
2006 Mar 27
13
Is this a bug in Ajax handling?
When a controller responds to a link_to_remote with a redirect_to, the link_to_remote gets a success callback, this would seem like a bug to me, at a minimum it should return a failure? This is driving me crazy because all the login engines/generators respond to an authentication error with a redirect_to. The work around is to change them to all do a render :layout => false, :status => 500
2006 Apr 28
4
can someone help DRY a noob? thanks...
hi all i''m trying to pass a variable name right round the block and need a hand to ease my aching brain. ##in my sidebar i have <li><%= SidebarItem(''catalogue'') %></li> <li><%= SidebarItem(''provenance'') %></li> <li><%= SidebarItem(''status'') %></li> ##linked to a
2006 Jul 20
5
Need HELP changing link_to_remote to a button
I would really appreciate some help with changing a link_to_remote call to a button of some sort. Here''s a little background. On the page there are two <div>s. One is a form that lets the visitor enter items. The second <div> is where the entered items get displayed, each in it''s own item <div>. Each item <div> has two <span>s. The first one
2007 Nov 16
3
Route Information
Is there a method to return a hash of the route configuration based on a path? For example: magic_method(''/my_controller/my_action/my_id'') => {:controller => ''my_controller'', :action => ''my_action'', :id => ''my_id''} Thanks! Tom --~--~---------~--~----~------------~-------~--~----~ You received this message
2006 Jan 16
3
routing to controller inside module
Hey, am i to stupid to find the information about how to route to a controller in a module? Maybe module support has gone! The controller is under: app/controllers/admin/my_controller.rb The my_controller.rb file looks like this: module Admin class MyController def index render :text => ''Hello!'' end end end How does a route to all controllers under module
2006 May 11
1
skipping filters
I have a simple login scheme in application.rb. Something like :requires_login is called in any controller as a before_filter. All is good, except I''m having trouble figuring out how to make the public login actions skip this before filter. Here''s what I have: application.rb skip_before_filter :requires_login, :only => [:login, :logout, :confirm_valid_login]
2006 May 09
1
Reusing a model to form and link_to.
Hy guys, Inside my app I have a form which contains user information. Sometimes a have a form with a text_field as above: <%= form_remote_tag(:html => { :action => url_for(:controller => "my_controller", :action => "my_action") }) %> <%= text_field(''my_object'', ''my_parameter'', :maxlength =>
2006 Aug 10
1
Web service SOAP URLs started failing with 1.1.4 or using 1.1.2 security patch
Railers, I''m trying to figure out why invocations to my Web service URLs work with Rails 1.1.2 but fail both with Rails 1.1.4 (and 1.1.5) and when I apply the new 1.1.2 security patch to Rails 1.1.2. It looks like they are failing with SOAP clients but succeeding with XML-RPC clients. The URL that used to work is of the form http://localhost:3000/my_controller/ServiceName/api. When I
2007 Apr 01
2
"-" instead of "_" in routes?
Hi all I''d like to have minus signs "-" instead of underscores "_" in my routes. Is there an easy to do that? my_controller/show_something/123 # <= not cool my-controller/show-something/123 # <= much cooler Thanks a lot Josh -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you
2007 Apr 05
3
Extending assigns in controller specs?
Hello, I am interested in enhancing assigns in controller specs to do things like the following assigns[:key1, :key2, :key3] #=> vals for keys Is there away to "break open" this construction to overload the :[] operator? Thanks. -Chris
2010 Jan 31
3
Append/Prepend to a template from controller method
I want a method in app/controllers/application.rb that can prepend/append text to whatever template gets rendered. Of course I can''t call render twice w/o getting a double render error, so is this possible? I want to redirect after a delay using a meta refresh. Here''s what I''ve got: app/controllers/application_controller.rb: def redirect_after_delay (url, delay)
2006 Jun 07
3
Getting values
What if I have this URL on my browser''s address bar? http://www.mysite.com/controller/rhtml/3 How can I put the "3" as a value inside the controller. Thanks, Jeremy -- Posted via http://www.ruby-forum.com/.
2006 Dec 29
4
Remote API passing in parameter named 'action', routing loses it
I''m working with a remote API that calls a URL in my app, passing in a parameter named action. So the request would look like: http://localhost/my_controller?action=foo Routing correctly interprets the controller action as index. However, it sets params[:action] to index as well. I know that''s how it''s supposed to work...but it means I lose the action parameter
2010 Jun 03
7
Scheduled tasks in Rails: Cron + wget = Best solution?
Hi there, do you agree that for having scheduled tasks in Rails, the leanest solution is the following? - Create a controller with an action for each task - Implement the logic of the task as controller code - Set up a cron job at the OS level that uses wget to invoke the URL of this controller/action at the appropriate time intervals Advantages: 1) full access to all your Rails objects just as
2015 Dec 17
2
vfs_fruit: xattr imcompatible with netatalk
On Fri, Dec 18, 2015 at 01:14:25AM +0900, HAT wrote: > Hi, > > >> not sure, but the colon in xattr names is probably not handled > >> correctly at this point. Can you please file a bugreport so we can > >> track this? > > > > Bug 11162 > > https://bugzilla.samba.org/show_bug.cgi?id=11162 > > I tested samba 4.3.1 on Fedora 23 and rawhide.
2006 Jul 16
3
RJS problem
I have an odd problem while trying to use a simple rjs. _test.rjs : page.alert "test" test.rhtml: <script><%=render_partial(''test'')%></script> When I am attempting to view controller/test the page comes as if it was a text file. So i am actually seeing: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2006 Jan 11
6
RJS and layouts
Hi all, I''ve been using RJS more and more for my app and I have sorta run into a possible issue. My app has different user roles that require different layouts. So far, this has worked fine, but now that I''m using rjs more and more I''m finding that the two don''t really work together since I have to rails not to use a layout upon controller method
2006 Apr 16
11
RJS templates not found
I am running Rails 1.10 and wanted to check out the RJS templates. Rails doesn''t seem to find them. I did issue the rake comment update_javascripts and that did not correct the problem. RJS is part of 1.1 right? Any ideas? Thanks. -- Posted via http://www.ruby-forum.com/.