Displaying 20 results from an estimated 117 matches for "mycontroler".
Did you mean:
mycontroller
2006 Feb 10
8
Prototype Inheritance example
Hello Everyone,
I am working on a control collection for javascript/Ajax.Net. I am stuck on
the class inheritance aspects of the prototype library. If someone could
point me to an example it would be a great help. I have looked through the
controls.js of the scriptaculous library and found something like the below
code, but everytime I ran it I would get a constructor error.
Thanks for any help;
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
2007 Aug 13
8
How to use expect_render?
Hi:
I am a rspec beginner. I have scratched my head for the whole afternoon,
trying to figure out a way of writing render expectation in controller spec.
However, I failed. It kept telling me that the ''expect_render'' was an
undefined method. I have installed rspec 1.0.8 and rspec_on_rails as well.
Below is the controller to be tested.
Controller
def index
pre
2006 Sep 15
3
How to catch a parameter that contains a full url
Hi
I need some help!
I have controller that I need to pass a full url (with its own
parametrs) as a parameter, e.g. I want to call my controller with:
/mycontroller/catchurl?url=http://somedomain.com/afile.jsp?param1=xx¶m2=yy
and in action "catchurl" in mycontroller.rb I would like to have
params[:url] to be
"http://somedomain.com/afile.jsp?param1=xx¶m2=yy"
2006 Mar 31
7
Reset events after ajax update
Avoiding real work I decided to try and clean up my html and remove my
inline onclick handlers for Ajax.Updater calls. Here''s the inline
method I''ve been using:
http://hank.org/demos/ajax-inline.html
Now, here''s using <script> sections to apply the behavior.
http://hank.org/demos/ajax.html (firefox only)
Since the links (tabs) are inside the
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
2006 Aug 08
1
Named routes and url generation?
Hi all
In my application I''ve some named routes defined this way...
map.label_context1 '':context1/label'', :controller => ''mycontroller''
map.label_context2 '':context1/:context2/label'', :controller => ''mycontroller''
map.label_context3 '':context1/:context2/:context3/label'', :controller
=>
2007 Mar 26
2
Calling a controller action from script/console or runner
Is there a way to call or invoke a controller method from script/console
or script/runner? The reason is that I''d like to pre-cache some of the
actions on my controller.
The pseudo code below is what I''d like to be able to do:
class MyController < ApplicationController
caches_action :test
def test
puts ''Hi there''
end
end
script/console:
2006 Jun 22
4
rendering partials in layouts?
Hello all,
Forgive me if this is a really stupid question. How do you render
partials in a layout? It''s probably way easier than i believe it to be.
thanks!
--
Posted via http://www.ruby-forum.com/.
2007 Aug 04
5
reusable specs - almost there
I have a lot of controllers with virtually identical functionality for most
actions. I''ve been using shared behaviours to DRY things up a bit, but I
still have to create separate behaviours for each context before I can use
the shared behaviours
what I have now is a generic file which contains all the behaviours and
examples common to all the controllers, and that file gets loaded from
2006 Aug 12
2
Layouts: application.rhtml v. mycontroller.rhtml
I was trying to be all DRY and standardize my layouts to one file and
made an application.rhtml. There was no application.rhtml at all
before.
So I renamed all my controller layouts to .txt and then tested. I got
empty pages.
I found some issues with Login/UserEngine and application.rhtml, but
nothing that looked like this behavior. Is routing messing me up? It''s
as if
2005 Mar 02
2
form action in mail (actionmailer)
Hi everyone. : )
I meet problem when use form tag in actionmailer. (content-type is text/html, surely)
I want to use form action in actionmailer''s view (.rhtml) for some reason.
1. I use start_form_tag helper method as normally, but how I can ?
I did <%= start_form_tag :action => "http://myhostname/mycontroller/myaction" %> or
<%= start_form_tag :action =>
2007 Jul 11
2
RWeka control parameters classifiers interface
Hello,
I have some trouble in achieving the desired parametrisation
for the weka classifier functions, using the package RWeka.
The problem is, that the functions
result=classifier(formula, data, subset, na.action, control = Weka_control(mycontrol))
do not seem to be manipulated by the mycontrol- arguments
Perhaps this should be resepected via the handlers- argument ,
but the
2006 Feb 03
2
testing to see if emails are sent out on exceptions
Hi,
I''m using ActionController::rescue_action_in_public() to send emails
when uncaught exceptions happen.
Is it possible to write tests for that?
Joe
2006 Aug 07
1
Routing/Redirecting
Hi all,
Can someone tell me how I could redirect from an url like
"www.url.com/mycontroller" to "www.url.com/en/mycontroller"? I was
reading all sorts of routing documentation but couldn''t come up with a
solution. Of course this should be a general rule, so
"www.url.com/mycontroller/myaction/myparam=99" should naturally redirct
to
2012 Sep 10
4
Object Efficiency
So I am using rufus-scheduler to call a controller which in turn calls an
email receiver to check emails...
In my controller, I have an instance method called checkEmail
In my rufus config file, I have to call MyController.new.checkEmail. Now I
set it to run every 5 minutes. So the system creates a new MyController
instance every 5 minutes. That''s very inefficient right?
I guess
2007 Dec 05
4
render :update and controller private methods
Probably asked and answered, but...
Why are controller private methods inaccessible inside the block
passed to render :update ?
This does not work:
class MyController < ApplicationController
def some_action
render :update do |page|
page.replace_html ''an_element'', some_private_method
end
end
private
def some_private_method
return
2008 Jan 31
6
loading fixtures?
How do you load fixtures from specs as you would test?
eg. rake db:fixtures:load RAILS_ENV=development
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/rspec-users/attachments/20080131/38c3b0ab/attachment.html
2007 Oct 16
6
respond_to API
I''ll probably do my respond_to API rewrite, as discussed here:
http://rubyforge.org/pipermail/merb-devel/2007-September/000275.html
sometime this week, unless someone has come up with a better API.
I''ll also work in http://merb.devjavu.com/ticket/227 at the same time.
Any serious objections?
2006 Apr 19
9
Initial load time when periodically_call_remote
When I do periodically_call_remote with e.g. :frequency => 30
after initial page load I have to wait 30 seconds until this partial
renders first time. Does anybody know how to make ROR to render partial
on web page load, and then start periodic calls every 30 seconds? I
tried to put
<div id=''mydiv''><%= render(:partial, :action=>''myaction'')