similar to: Can one controller use another''s Helper Methods?

Displaying 20 results from an estimated 1000 matches similar to: "Can one controller use another''s Helper Methods?"

2007 Mar 16
1
sort_link_helper and cross-controller partials
Hello Rubyists, I ran into a problem with sorting a table (rendered in a partial) using the sort_link_helper methods after I have submitted data and re-rendered the table through an AJAX request. The setup is a follows: The table is a shared partial of Controller1 and Controller2 accessible via "shared/table". The AJAX''ed sorting using the sort helper works all fine on
2008 Mar 09
1
Two sample t-test
Hi, I want to perform t-test in R for each individual car. Here is what i have. Is there a way i can test each car? The original table (test.csv) Car Tester2 Tester2 Controller1 Controller2 Audi 0.56 0.9 0.5 0.9 Toyota 0.2 0.9 0.9 0.2 Honda 0.5 0.9 0.1 0.5 BMW 0.2 0.3 0.5 0.7 > cars<-read.table("c://test.csv",header=T,sep=",", + skip=2,comment.char="")
2006 Jul 18
3
Navigation techniques, everyone?
I''m rewriting the code to my first app. I want to reuse a lot of it, but tidy it up a lot. The first thing I will tackle is my nav-bar. Throughout a user''s experience on my app, I want it to reload as little as possible (I''ll have about 7 or 8 controllers with about 70 actions). So, I''ve thought of a few ways of doing it, and was wondering if you guys
2006 Jul 26
4
can you pass data when you render :action
how can i do: render :action => "headline", :id => @user.id Thanks, Ben Lisbakken -- Posted via http://www.ruby-forum.com/.
2006 Jul 27
3
How do I update a div''s content in the controller?
Without using an RJS, is there a call I can do in the controller? All I want to do is this statement, but in the controller: new Effect.toggle(''notifier_nav'',''appear'', {duration:12.0}); Thanks, Ben Lisbakken -- Posted via http://www.ruby-forum.com/.
2006 Jul 19
4
Using Application.rhtml as layout for all controllers
I put my nav system in application layout. that way any controller loading will have the nav system. I have one problem though - the <%= yield %> is in the body, so how would my controllers specify other css files? my application layout would look like this: <html> <head> title css include javascript include </head> <body> nav system <%=yield%>
2006 Nov 04
0
sharing a partial across multiple controller views.
Hello, I was wondering if there was a way to share a partial across multiple controller views? In other words, if I have 2 controllers, the corresponding directory structure for the views of those conrollers would like so: views/controller1/<views> views/controller2/<views> I would like to share the partial between controller1 and controller2. Could I make a share directory under
2006 Jul 20
7
How do you use :message with validation?
If I do validates_uniqueness_of :name, :message => "It''s not uniqueeee!!!" then how do I have it display that message when the check fails? -Ben Lisbakken -- Posted via http://www.ruby-forum.com/.
2006 Jun 21
3
Call action & display nothing?
Can you do a periodically_call_remote to an action but then not display any new view? say the new action was called ADD. I don''t want to do an rhtml file for add, and I don''t want to render anything in the controller... I want to leave the page as it is. How is this done? Thanks, Ben Lisbakken -- Posted via http://www.ruby-forum.com/.
2006 Jul 19
2
Mouse Location
Is the only way to get the mouse location by using javascript? Or does rails do it for me?!? :) Does anyone have a simple script that they use? I''m trying to put a div right where the mouse is clicked on a link... so I''m looking for it to work like this: a hre f=. onclick=Element.setStyle(''title_login'', {left: MOUSEX,top: MOUSEY;});new
2006 Aug 10
4
How to upload all images in a folder?
Instead of making a form to upload one picture at a time, I''d like to have the File Column plugin accept a directory, and have each picture be uploaded and thumbnails created (w/ RMagick). Has anyone done this? Anyone have a good idea where to start if I were to do it on my own? Thanks, Ben Lisbakken -- Posted via http://www.ruby-forum.com/.
2000 Feb 28
1
Failed RPC Call
I am totally at a loss. I use domain authentication off an NT Server 4.0 computer with service pack 5. I use Samba 2.0.6 running Mandrake 7.0 on my fileserver. I've tried both the "stock" version of samba that came with Mandrake and also a fresh build from the tarball off samba.org's mirror site. Here is the problem: I have a series of services established, all of which
2006 Jul 25
11
Prevent users from entering urls
How could I make it so that links on my page could link to a controllers action, but if the user manually entered the url, it would redirect them back to the main page? Is this possible? Thank you, -Ben Lisbakken -- Posted via http://www.ruby-forum.com/.
2010 Oct 14
7
undefined method?
I''m trying to learn rails as I go along, and having a bit of trouble. There is an undefined method cropping that I don''t know why rails thinks should be there. Firstly, I''m using rails 3, ruby 1.9.2 I have a controller with an index action This part works fine, but i am trying to add a comment form to the page that is rendered by that index action. Supposing my
2006 Feb 14
7
9cays - A Rails app for Group Email
Even though it''s a little OT, I thought I''d announce the free public beta of a new Rails app that I''ve been working on for a while: http://9cays.com Think of it as mini-mailing list software. For a lot of smallish conversations, normal mailing list are too heavyweight (requiring setup, moderation, admin, etc.), but group email is a pain because messages
2006 May 21
3
Using ParseDate in for loop
Hi, I''m trying to use ParseDate within a for loop but I get this error: can''t dup NilClass Any suggestions for making this work? Thanks, -Jason
2006 May 30
0
2 quick question about SaltedLoginGenerator
Hi all, I''m using the Salted Login Generator. It''s fantastic. And I have tow quick questions, wish you could give me a hint. 1. I have a few controllers, which all got "index" action. And how can I make login system pass Controller1::index, but restrict access to Controller2::index 2. When the user click the link to verify himself, I want to fill some my customised
2010 Apr 26
2
woriking under webrick but not under passenger
Hi! I have just added login feature to my rails application (followed the instruction from (Agile Web Development with Rails) but now I am getting strange errors (looks to me like some kind of routing problem) under the passenger/apache. The error is: 500 Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. From the log:
2006 Aug 11
5
Why does no one like render_component?
Maybe I''m missing the point? Lets take for example albums of pictures. If I have a scaffold for each, and I''m showing an album, what if I want to list all of the pictures that are in the album? Surely, I''d want to call the List action in the picture controller. render_component would do this perfectly. But we''re told not to use render_component. So
2006 Jun 10
3
Weird Problem With Active Record
Is it me or is my model getting the created_at from the wrong model! I have a HABTM relationship between Problems and Tags. In one of my controller I do the following: def view @tag = Tag.find_by_name @params[:id] end In my view I do this: <% @tag.problems.each do |problem| %> ... <%= problem.created_at %> ... <% end %> Now, how come the created_at