search for: someaction

Displaying 14 results from an estimated 14 matches for "someaction".

Did you mean: some_action
2007 May 30
6
authentication mocks
hi I''m using restful_authentication and have controller specs working using users fixtures (and login_as) however i''ve been trying for hours without success to do it without fixtures, using mocks and stubs instead. anyone here done this? got code? :) thanks
2007 Jan 31
1
help please!
Hi, I''ll appreciate insight on this one... it''s causing me some pain on my production env. <%= link_to "something", :controller => "somecontroller", :action => ''someaction'', :id => someid, :favorite => is_a_favorite %> I added a boolean :favorite to the URL arguments. THis has always worked well under my dev environment (webrick) and produced: <a href="/somecontroller/someaction/someid?favorite=false> but now, under production, wi...
2008 Oct 10
16
rspec - undefined method `describe'' for main:Object
...e File.dirname(__FILE__) + ''/../spec_helper'' #require ''./../../vendor/generators/rspec/lib/rspec_on_rails'' #require ''sandbox_controller.rb'' require ''spec'' gem ''rspec'' describe SandboxController,"handling someaction" do it "should get real value 10" do get :someaction assigns[:value].should equal(10) end end My controller is class SandboxController < ApplicationController def someaction @value = somemethod end protected def somemethod return 10...
2006 Apr 28
4
can someone help DRY a noob? thanks...
...if @updated page.replace_html ''EditFields'', :partial => ''catalogue'' end so how can i dry it up and end up with something like this? ##helper def SidebarItem(NAME) link_to_remote "#{NAME}", :url=> {:action => SOMEACTION(NAME), :id => @work.id, :layout => false} end ##action def SOMEACTION(NAME) render (:template => ''admin/works/NAME'', :layout => false) end ## where NAME.rjs contains if @updated page.replace_html ''EditFields'', :partial =>...
2006 Mar 18
2
Additional link tag attributes with link_to_function...
...do this with adding a class="foo" to certain links and specifying the look with css, but I''m unsure how to do this with Rails. Currently, I have: <%= link_to_remote("foo", :update => ''some-id'', :url => { :action => :someaction, :params => { :parameter => "value" }}, :loading => "Element.hide(''some-id'')", :complete => visual_effect(:appear, ''some-id'')) %> which generates <a href="#" onclick="new Ajax.Updater(...
2006 Feb 07
5
homepage instead of welcome page?
Got a noob question for ya... When I visit http://localhost:3000/ I get the nice "Welcome to rails" page. To get to a controller I have to go to: http://localhost:3000/controllername What if I don''t want the welcome message and want / to resolve to a controller? How do I set that up? Thanks, Dave -- Posted via http://www.ruby-forum.com/.
2007 Jul 26
2
DMZ and LOG
Hello !! I ve just install shorewall-common and shorewall-shell I can''t defined a network using the CIDR format for my DMZ in /etc/shorewall/hosts fast eth2:172.17.0.0/16 epac eth2:172.18.0.0/16 fsa eth2:172.19.0.0/16 bu eth2:172.20.0.0/16 recto eth2:172.21.0.0/16 dmz eth1:81.91.225.224/27 I receive this error: ERROR: Invalid zone definition for
2006 Jul 10
1
link_to_remote questions
...tried link_to_remote to see the build in AJAX capabilities with rails for the first time for me, I tried the following code and it worked: <%= link_to_remote( "some link", :update => "some_div", :url =>{ :action => :someaction }) %> OK, it has worked, but I have two questions here: 1- When moving between links the URL in the browser still the same (which is the name of the controller), I expected that the name of the action must appear as it used to: www.domainname.com/controller/action 2- How can I create some (Lo...
2006 Apr 17
0
AcctionMailer templates
Is posible to use helpers in ActionMailer templates??? When I do: <%= link to ''my link'', :action=>''someaction''%> in the mail template, I get the following error on the browser: undefined method `url_for'' for #<AdminMailer:0x8ebdfcc> Thanks.
2005 Dec 21
0
Counting helpers through a view
...orts of relations, so I need to have different id''s assigned to their HTML elements. What I would like to do is somehow count them as they are installed in the view and reset at the top of the view. My current thinking is: --- In controller --- before_filter :myhelper_resetcount def someaction end --- In view --- <%= myhelper_tag() %> ... Some stuff ... <%= myhelper_tag() %> ... Some stuff ... <%= myhelper_tag() %> ... --- Results --- <div id="helper_1"> .. </div> ... Some stuff ... <div id="helper_2"> .. </div> ... Some st...
2007 Mar 12
1
Can't follow redirects outside current controller - but it's the same controller
...ed_controller && redirected_controller != @controller.controller_name to if redirected_controller && redirected_controller.to_s != @controller.controller_name.to_s fixes the problem. Has anyone else hit this? The method in question is just doing ''redirect_to :action=>:someaction''. Gwyn. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe fro...
2007 Apr 29
0
integration test redirects to external URLs
In an integration test that I am writing I want to do something like def test_my_page get "/rails/someaction" assert_response :redirect follow_redirect! assert_url => ''http://www.somepageoutsidemyrailsapp'' end Is there any way to do something like ''assert_url'' and see if I was redirected to a page outside of the rails application? If the page...
2009 Feb 25
0
Routes with parameters ordered differently
...nd :c get mapped to params[]) what i''d like to do is make a mapping of the form map.connect ":foo/:controller/:action/:id" i''d like to do something like this so people can, say, choose a locale in the url as the param[:foo] (like http://myserver:3000/en/somecontroller/someaction/) is that possible? i tried adding the route: map.connect ":foo/:controller/:action/:id" and when i try to go to an address like the one i specified, it returns that no route matches. I''ve seen other posts in the archives that suggest this should work, but maybe there'...
2007 Jul 30
1
streaming response
hello list! I like merb a lot, it frees me from dropping to mongrel every time i want to stream something. i have an action which will stream a list of JSON objects (separated by semicolons). unfortunately because of Mongrel''s write-only header hash, once a Content-Length header has been written, I can never again tell it to not send such a thing - and streaming doesn''t work if