Displaying 20 results from an estimated 900 matches similar to: "Aggregate Controllers"
2006 Apr 03
3
render :partial + redirect_to :controller
This is of course disallowed, which I discovered only after nearly
completing my spanking new ajaxified UI. What is the motivation behind
this, and what is the best workaround?
This UI does a scriptaculous drag-and-drop of items from a first div
(div1) over to a second div (div2), which triggers the contents of div2
to be updated to reflect the drop. No prob, thus far. But then the
2006 Apr 29
11
Multiple actions from one form - possible?
Hello *
Obviously the rhtml below does not work, but it should be apparent what
I try to achieve - I would like to give the user the choice to submit a
form either to action1 or action2 but I cannot figure out how?! It would
be great if someone could give some assistance.
Thanks a lot, Alex
<%= start_form_tag :action1 => ''save'', :action2 =>
2009 Mar 05
4
before_filter :action_name OR :action_name
Hi there
I am wondering if we can use before_filter in the form of :action
OR :action
what i want to do is to implement one of the actions, if the first
failed, then go to the second
when i use
before_filter :action1
before_filter :action2
each method will run them, my case is that i want to check if one of
them is true and not both
any idea?
2006 Apr 10
3
form_remote_tag can only have one submit button?
I setup a form_remote_tag with several submit buttons, all of them share
the same name
( ''do_action'' ) and their values differ.
eg.
button1 named do_action with value ACTION1
button2 named do_action with value ACTION2,
etc
No matter which button I press the value passed is always the one
defined for the first of these buttons ( the correct value associated
with the pressed
2006 Apr 03
1
Best way to set custom Controller options
Hi All!
I''m searching a good way to set some options in my Controllers; I tried
defining a custom function, ie:
class PeopleController < ApplicationController
set_my_actions :action1, :action2
end
class ApplicationController
def self.set_my_actions(*args)
@@my_actions = args
end
end
But ''@@my_actions'' sets the class variable to _every_
2014 Feb 18
1
Invalid key 0 given to dptr_close on Samba 4.1 Domain Controller/File Server
Hello,
I am currently working on a solution to replace Apple OpenDirectory on some aging Xserve hardware. I currently have CentOS Samba4 AD DC?s replicating for redundancy using sernet-samba repositories. The third one has File/Print roles defind and it works perfectly EXCEPT on OSX 10.6. IT works great on any Windows workstation and OSX 10.7,10.8, 10.9 GNOME/Nautilus and even CIFS CLI mounting
2024 Sep 02
1
Configuration of numerous shares
Maybe someone here has the acquired experience necessary to answer this
question:
Since each share consumes resources, such as RAM and processing, which would
be the most effective scenario? Share a directory for each department, such
as:
Acounting
Finance
HumanResources
This soon leads to dozens of shares in my case.
The other option is to share only the top folder (Enterprise in the
2006 Feb 27
2
submit_tag
How can i use the submit_tag method (from: actionView::FormTagHelper)
to create various submit buttons and chose the right action in accord to
the button that i pushed?
--
Posted via http://www.ruby-forum.com/.
2008 Feb 19
3
render_to_string in a controller test?
Hi all,
I know that in general, view and controller tests should be isolated,
such that controller specs don''t test views etc. However, I think
I''ve run into a situation that might be an exception.
My controller uses render_to_string to produce a chunk of HTML that it
passes to a model to be processed.
The controller then redirects the user to a different page. The
2012 May 28
1
rendering a partial inside another using render_to_string and (:formats) in controller
I want to clean my code by moving the duplicated lines :
partial = render_to_string( :partial => "#{file}", :formats =>
[:html] )
to the pagination_partials function.
=================================================
WORKING CODE:
=================================================
def render_format_search_partial(file, options={})
# TODO remove this line to use the one
2007 Nov 30
5
render_to_string in an after filter
I''m using render_to_string in an after_filter, which renders a partial
that is sent to a web service. Here''s the code:
class MyController < ApplicationController
after_filter :post_to_webservice
def show
# show logic
end
def post_to_webservice
stuff = render_to_string :partial => ''stuff''
webservice_post(stuff)
end
I get a DoubleRenderError in the
2007 Apr 19
4
render_to_string in a model ?
I have a batch job that will call script/runner, I would like in this
call to create html formated email and save it to the database. This is
easy enough in a controller with
yournewhost.email = render_to_string :action => "email_newhost_ready",
:layout => false
But render_to_string is only available in controller action pack, is
there a easy way to render_to_string in a Model? Or
2007 Nov 25
2
Fwd: Render_to_string from a worker
Hi,
I am trying to generate a PDF from within a worker using PDF::Writer. In my
controller I use render_to_string to create the pdf file however from what I
understand render_to_string can only be used from a controller.
Does anybody have any suggestions how I might be able to replicate this
functionality in a worker?
--
thanks,
Felix
-------------- next part --------------
An HTML attachment
2010 Mar 17
3
rails+prawnto: setting :type to :prawn in a #render_to_string call not working
Hello, my question is rails related though it is also somewhat
specific to the prawnto plugin (installed latest version as of
2010-03-15). I would ask on a prawnto forum/list if I knew where one
was.
Anyhow, I''m using rails 2.3.5 (with ruby 1.8.6 patchlevel 111) in an
app that is successfully using the prawnto gem (with the prawn gem
version 0.7.1). I''ve got a a
2011 Mar 06
2
render_views and render_to_string
Hey guys. One of my controller actions uses #render_to_string to send back a
JSON response.
When I try to spec this, Ruby raises a NoMethodError, saying that
#render_to_string doesn''t exist in my controller action.
Here''s the controller action, spec, and output:
http://pastie.org/1640962
Any idea what I''m doing wrong? Thanks,
Nick
-------------- next part
2011 May 17
1
rails render_to_string problem
Hi
I`m trying to test my controller with rspec and always get an error.
The error is in the render_to_string method call (without it test
works fine). So could u please help me with that?
users_controller.rb:
def update
@user.update_attributes!(params[:user])
redirect_to @user, :status => 202, :text =>
render_to_string(:partial => "users/show", :type =>
2006 Feb 20
3
Background work
Greetings,
I''ve got a rails app which is basically an admin interface to a xml
dataset. Currently I''ve got rails rigged to call a function to spit the
entire dataset to file with every change. This would actually be ok, its
fairly infrequently updated, but when the dataset grows large the user sits
there waiting for it to dump with no feedback as to whats going on. Oh yes,
2006 Jul 02
3
2 before_filters, only want one to render something
I have two before_filters for a few of my controllers. They are running
my own methods authorize and admin_authorize. authorize is called on
just about every action to make sure that a user is logged in.
admin_authorize is called on about 80% of the actions and is used to
make sure that a user is an administrator. If a user tries to access an
admin_authorize protected action without being
2004 Jan 21
2
[Fwd: Re: Comboot Menu]
Thanks for the comment. The next pass for a file format ...
------ FILE BEGINS -----
# Comment lines
[menu]
item="text to display"
status="status line text"
action= SUBMENU | INACTIVE | whatever
submenu= <number>
data="arbitrary string"
item="text to display"
status="status line text"
action= SUBMENU | INACTIVE | RUN | EXIT
submenu=
2006 Jul 05
3
Calling render_to_string from a view
I''m playing around with a list of todos, which I want to render as
<ul>''s that can nest to an arbitrary level, so I wrote this as a helper
method:
def print_todo(t)
str = "<ul>\n\t<li>"
str += render_to_string(:partial => ''todo'', :object => t) + "\n"
t.children.each { |c| str +=