similar to: A place to put common partial templates and RJS files?

Displaying 20 results from an estimated 5000 matches similar to: "A place to put common partial templates and RJS files?"

2007 Mar 21
2
A real puzzler: attr_accessor / create incompatibility?
Greetings, I have a problem with attr_accessor and create seemingly being at odds with each other in my environment. Here is the setup: A simple class representing a US State (say, Maine for example): class State < ActiveRecord::Base attr_accessor(:name, :code) end In an IRB session, I type the following and receive the response included below: >>
2006 Jul 20
6
replace_html + javascript
Hi all, This is my first post to the list, so I hope it gets through and I don''t do anything wrong :) Here''s the issue I''m having... I have an rjs that''s doing: page.replace_html ''myid'', :partial => ''my_partial'' And in my my_partial I have: <script type="text/javascript">
2006 Feb 01
1
SR&ED Calculator (features in-place-editor and RJS templates)
Figured you guys might be interested in taking a peek at a project I have been working on for a client. TechIncentives is an SR&ED (government tax credit for Research & Development companies) organization specializing in assisting your organization receiving Canadian grants for your R&D work. I have since converted his Excel spreadsheet that had multiple tabs and some formulas
2006 May 08
17
partial problem
def my_controller @variable = [{''myfield''=>''grey''},{''myfield''=>''blue''}] end #-------------------------my_view <table> <%= render :partial=>''my_partial, :collection=>@variable %> </table> #----------------------_my_partial <tr> <td><%=
2008 Feb 29
0
RJS and EXTjs component update (RAILS 1.2.3)
I want to use an RJS view to update EXT Panel bodies. But since the panel bodies have generated element ids, I can''t see how to use ''page.replace_html''. So instead I wrote a javascript function ''updateBody''. In the RJS view, I want to say something like: page.call ''updateBody'', ''some_panel'', :partial =>
2006 Jul 13
6
Render partial questions
Hello, what is the preferred way to do this... I have 2 controllers. Each has an index action. Now I want to include the rendered index view from TwoController in the index view of OneController. But a render :partial doesn''t execute the TwoController index action which sets variables for its index view. So maybe you can give me a short example how to do it. Thank you Markus
2006 May 04
1
Ajas Scaffolding and RJS Templates the same thing?
Hey all, I''m just starting in rails and am working on my first app. I need to do inline editing for 2-15 rows of data on a page. I found Ajax Scaffolding here: http://www.ajaxscaffold.com/ And it is EXACTLY what I want in my app. But I''ve also been trying to read a bit up on RJS Templates. Are they basically the same things except RJS is built into rails or is the
2006 Feb 18
2
Effect queues with RJS templates and scriptaculous
Hi. I was wondering if it''s possible to combine effects for individual elements with RJS templates. I notice that scriptaculous has support for a concept called effect queues (http://www.railsdevelopment.com/2006/01/15/effectqueue/). Is there anyway to use these queues from rjs?
2006 Jan 24
1
Liquid templates and RJS
Does anybody know whether Liquid templates can be combined with RJS ? -- Roberto Saccon - http://rsaccon.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060124/edeafadc/attachment.html
2005 Dec 19
1
Question about rjs templates
Hi everyone I read some support about rjs templates at http://www.codyfauser.com/articles/2005/11/20/rails-rjs-templates but when i download the rails1.0, i could not find the code in http://dev.rubyonrails.org/changeset/3078 ,and i also could not find the file actionpack/test/fixtures/test/delete_with_js.rjs is something wrong with me.thanks for your answers. -- Posted via
2006 Mar 29
2
vim syntax highlighting of rjs templates
Are there config files for vim that offer syntax highlighting of rjs templates? Charlie Bowman http://www.recentrambles.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060329/486c9d84/attachment.html
2006 Jul 29
0
RJS templates, Safari 1.3
Hello, I''m having a problem getting RJS templates working with Safari 1.3 (latest version available to OS X 10.3 and earlier). I''m using Rails 1.1.4, running on either linux or OS X.. same results. My RJS pages work fine using Safari 2.0, IE and Firefox.. just not Safari 1.3. The twist is that the following RJS sites work fine in Safari 1.3: http://depot.iamjp.com/demo
2006 Jun 19
1
RJS Templates
I have a page that when a form gets submitted, I use page.insert_html to stick a div in another div. The problem is, when I want to refernce it later on, the IDs are not unique. So to get around this, I concatenated the id of the item to the end of the div name. Which is fine. I did the same in the RJS template as well, but it''s not finding that div. I tried it with string
2006 Jan 09
2
Using RJS templates with observe_form
Hi there, I''ve been checking out RJS templates, and have been trying to use them with the observe_form helper. However, the form values are no longer being passed in the params (as soon as I point the action to the non-rjs and add the ''update'' clause everything is working again). Is this expected? Cheers, Dave -------------- next part -------------- An
2006 Jan 29
2
GetText and rjs templates?
hi, is it possible that gettext don''t work with rjs templates? i''ve just tried this simple example blog_controller.rb : class BlogController < ApplicationController def index end def dosomething end end index.rhtml : <html> <head> <%= javascript_include_tag :defaults %> </head> <body> <div id="test">Some text to change
2006 Apr 21
1
Simple debugging solution for RJS templates
I know I love the new RJS templates but the one annoying thing is that I don''t get the nice Rails error pages anymore when something goes wrong. I wrote up an article with a code snippet for fixing that. Hopefully it will help out some of those as frustrated as I was. http://www.height1percent.com/articles/2006/04/21/improving-debugging-for-ajax-and-rjs -- Posted via
2006 Jun 26
3
RJS Templates with dynamic id names
Due to the use of partials, I''m trying to dynamically generate the ids being affected in an rjs template, but I can''t seem to get the syntax to work. Basically, I need to do the equivalent of this from the .rhtml template: page.show ''mything<%= @thing.id %>'' No joy there. Apparently RJS templates don''t work with embedded ruby. So I tried:
2006 Jun 17
2
RJS templates - newbie
I am trying to test drive RJS templates in Rails 1.2. Here is what I did: create table categories (name varchar(255) ); rails RJSTest cd RJSTest rake update_javascripts script/generate controller home index add script/generate model category Note: When I did a rake update_javascripts, I did not see any output. I configured database.yml to talk to mysql. Next I wrote
2006 Mar 31
3
RJS templates outputting bloated code?
I''m an RJS newbie. I just did the tutorial at http://www.codyfauser.com/articles/2005/11/20/rails-rjs-templates, and then used wget to look at the output the RJS template generates. This is what I got: try { new Insertion.Bottom("list", "<li>Fox</li>"); new Effect.Highlight("list",{duration:1}); Element.update("header", "RJS
2006 Apr 17
2
Building Dynamic DOM Element IDs for RJS Templates
My element IDs are constructed using the object id. So . . . <div id="foo<%= foo.id %>" > <p><%= link_to_remote "Do Foo", :url =>{:action => "do", :id => foo.id} %> </div> How do, and can I, build that id in the RJS template? Also, can anyone recommend a good Ruby syntax book that would help me out with Rails? I know