Displaying 20 results from an estimated 100000 matches similar to: "Call controller function from helper"
2006 Apr 27
12
Execute controller function from RJS
Hi all,
I wonder if it is somehow possible to execture or redirect to a
controller function from RJS?
Right now I do:
def foo()
render :partial => ''executeagain''
end
_executeagain.rhtml
<script>
new Ajax.Updater(''elmntID'', ''/test/foo/'', {evalScripts:true});
</script>
This will loop I know :)
How can I achieve the same
2007 Feb 22
5
Combine ferret with database
Hello list,
I wonder if someone has some tips on joining a ferret search with a
database.
I have a rails project using a postgresql backend and I would like to
utilize the superb performance of ferret for fulltext searching.
The problem is that I have to joined the result with the database as
I have some user access rights to different documents to take into
account.
Does anyone have
2007 Mar 06
3
Highlight method creates malformed characters.
Hello list,
I''ve just updated to 0.11.3 and I came upon this problem.
When using the highlight function in a rails application I sometimes
get the error "Malformed UTF-8 character."
It is just on certain documents and if I change the excerpt length
the error disappears so it feels that if the highlight method cuts
the text at the wrong character the function returns a
2006 Oct 08
3
Call an helper method from a controller
Hello, this have been debated few times in the forum but I didn''t found
a satisfying solution : my problem is very simple, I have few methods
dealing with cookies that are intended to be used in controllers and
views.
Let say I have the read_cookie() method. Because it deals with the
response object putting this method in the /lib directory doesn''t fit
nicely because I
2006 May 02
1
Sharing function between helper and controller
Hi,
I have a utility function repeated in both my helper and my
controller. Not DRY. I have this repetition because other functions
in the helper and in the controller both use the utility function.
Where do I put this function so that both the helper and controller
can access the function? Mayber there is a different solution?
Thanks,
Peter
2005 Dec 13
2
NET VIEW equivalent in Samba
Hi!
Is there a NET VIEW equivalent in samba?
I looked at smbclient -L but then I have to know the browser master.
I only want to specifiy a workgroup..
Regards,
Henrik
2006 May 21
6
Is there a way to call helper methods in a controller?
Hi,
Is there a way to call helper methods in a controller?
I want to do something like this in my controller
Class MyController < Action....
def my_method
string = link_to "some_url", :controller => "home", :action => "command"
end
end
link_to is an ActionView helper method and it seems that I couldn''t access
the method in the controller
2006 Apr 13
2
Big performance difference between smbclient put/get
Hi list,
I'm using Samba 3.0.21 on a FC4 box.
When copying files using smbclient I get huge speed differences
between put and get commands.
smb: \> put backup.tar
putting file backup.tar as \backup.tar (543.0 kb/s) (average 543.0 kb/s)
smb: \> get backup.tar
getting file \backup.tar of size 31549440 as backup.tar (7681.4 kb/s)
(average 7681.4 kb/s)
smb: \> put backup.tar
2006 Mar 08
3
date created attribute doesn't seem right
Greetings,
I've setup a samba server (ver 3.0.14a-3) on debian sarge. When I copy files to the server, the 'date created' attribute is always the same value as the 'date modified' attribute. The 'date modified' attribute remains the same, but the 'date created' changes as noted above.
I also have a snap server which has the same type of behavior. It is my
2005 Dec 29
1
Calling helper from a controller
I try to call a helper define inside the *application_helper.rb* but I
obtain an error.
Is it possible ?
There is an other way ?
Thanks
2006 May 16
1
How to handle special characters in filenames
Hi,
I'm using samba 3.0.21 on a FC 4 box.
I'm connecting to Win XP pro clients.
Using smbclient I can get and put files which contain '%' in file names.
Using libsmbclient smbc_open this is not possible. I get 'No such
file or directory Errno::ENOENT' error.
Any ideas how to solve this.
I guess it has to do with escaping special characters in smb urls but
I
2007 Jul 12
1
Using setuid on smbd
Hello list,
I wonder if it is a really bad idea to setuid bit on samba daemons to
make them start with root privileges?
I need it in an embedded systems where the daemons are started by a
non root user and I don't have access to sudo etc and we all know
that smbd should run under root.
Cheers,
henke
2006 Jun 16
3
Not able to recognize helper class method in controller!
Hi,
Not able to recognize helper class method in controller!
When I try to call some method "get_formatted()" in my controller, it
says local method not recognized.
Please help me out.
Thanks,
josua
--
Posted via http://www.ruby-forum.com/.
2006 Jul 25
0
Helper in controller?
Hello,
I have have written a statictics controller for one of my applications -
and I want to allow users to pull out certain statistics from a certain
period.
In my view, I''ve added something like this:
[view]
<%= form_tag :action => "bu" %>
<select name="bu">
<option value="04">Germany</option>
</select><br>
2006 Aug 13
2
Writing a Helper function
I''ve finally gotten to the point where I want to write my own helper
function to call from my views. I used the script/generate to create my
Controller so I also got the helper file.
I defined the method I wanted to use in the helper rb file, but when I
try to call them from the view I get a NoMethodError raised.
Is there anything else I have to do besides creating the method in the
2009 Apr 05
1
Testing: Application controller and helper
How do we test application controller and application helper in rails?
Thanks in advance..
-
Shauma.
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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 Mar 15
0
Can observe_field call another helper method?
I know it has :url and :funtion option.
I usually use it to call a controller action with :url, but I don''t know
how to make it just call another helper method.
By calling helper method, I think I can make my helper more portable.
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
2005 Dec 22
0
use helper methods in controller? (sanitize)
Hi,
I want to use the method sanitize() to clean up some user input before I
save it to the db. sanitize() is a helper method, so it is only usable
in templates, right?
So how can I use helper methods in the controller, or why should I not?
I could build a template like "<%=sanitize(input)-%>" and use
render_to_string, but that seems pretty hackish.
Or I could sanitize every
2006 Apr 24
7
Controller can''t find helper?????!!!!!????
I have a controller named xyzController under app/controllers
I have a helper class named xyzHelper under app/helpers.
Shouldn''t I be able to call methods from xyzHelper inside of
xyzController without any problems?
Thanks,
Wes
--
Posted via http://www.ruby-forum.com/.
2005 Oct 04
3
Net Rpc Logoff possible?
Hello!
I wonder if it is possible to send a logoff rpc signal?
If it is not possible as today would it be possible if we could trace
the rpc logoff signal sent p? MS own products?
Any suggestions are welcome!
Regards
Henrik