Displaying 20 results from an estimated 80000 matches similar to: "fix for modularized controller using overwrite_params"
2005 Sep 06
4
url_for: :overwrite_params went missing
Somewhere between 0.13.1 and the current SVN version
the :overwrite_params option to url_for (and related methods) went
missing. I can''t tell whether this was deliberate or by mistake, and I
have no idea how to get the same functionality in some other way
either.
Michael
--
Michael Schuerig Life is what happens
2005 Mar 03
0
where is :overwrite_params ?
HI,
it seems the :overwrite_params option has disappeared from the
url_builder. Is there a reason or is it just a side effect of the new
routes? Any chances to see it coming back?
If that matters, I use it a lot :-)
Raph
PS:
For those who don''t know it, it lets you use the current @params as
parameters for eg link_to, just overwriting the values you want.
For example, when displaying
2007 Apr 09
8
How do I use link_to with all the current options?
In one of my pages I want to create some URLs that go to the same
page, but tack on an extra parameter (column sorting stuff). How do I
do that?
I''ve tried
link_to "Title", :sort => "title"
and that''s pretty close...it keeps the controller name, but it doesn''t
include one of the parameters. I''m using nested routes, so the URL
should
2005 Nov 19
1
link_to weirdness
Hi,
I''ve got a page running at say http://example.com:3000/admin/players
Then I''ve this bit of code to generate a URL like:
http://example.com:3000/admin/players?order_col=fname&order_dir=desc
<%=link_to col[:label], :overwrite_params => {
:order_col => col[:field],
:order_dir => @order_dir == ''asc'' ? ''desc'' :
2001 Jun 12
1
Mounting / as ext3 when ext3 is modularized in 2.4
Hello,
I recently switched from 2.2 to 2.4 kernel. Each partition already contains
a journal. I tried kernel-2.4.5-0.2.9 from RedHat Rawhide, where ext3/jbd is
modularized. For the people who want to try this kernel, you first need to
rebuild it, and enable CONFIG_JBD_DEBUG. This solves an unresolved symbol
in jbd.o which prevents ext3 to load. (This issue will be solved in next
RawHide)
My
2006 Sep 27
7
problems with accessing controllers in sub tree directory
Hey guys,
I used "script/generate controller admin/event"
How do I link to the views and the controller when it''s inside a
directory.
I tried
<%= link_to "some link", :controller=>"event",:action=>"index" %>
<%= link_to "some link", :controller=>"admin/event",:action=>"index" %>
<%=
2007 Jan 25
4
How to change the menu depending on the controller/method?
Hello,
I''m still dtarting with ruby on rails. And I''m trying to have a menu
depending on the current controller/method.
Here is what I was thinking of (please tell me if there''s a better way
to do it):
I have a database with menu_groups (corresponding to controllers) and
menu_elements(corresponding to methods). Each menu_element belongs to
one menu_group.
I created a
2008 Feb 22
12
DRY - in controller or model????
Hello.
I''m trying to make clean efficient code and would like to find out if
there is a "BEST" way to write code. I want this to run quickly and
efficiently for my app.
I''ve got a form that needs a select list created for new and edit
functions. Same list.
Do I do this in the controller and reference @list in the forms?
def new
@list = %w { apple orange banana }
2007 Sep 10
3
Can't reach a controller :(
When I try to see a controller I get a 404 error, this is what WEBrick
says
What could it be? Thanks for the help ;)
=> Booting WEBrick...
=> Rails application started on http://0.0.0.0:3000
=> Ctrl-C to shutdown server; call with --help for options
[2007-09-10 13:30:26] INFO WEBrick 1.3.1
[2007-09-10 13:30:26] INFO ruby 1.8.6 (2007-06-07) [i486-linux]
[2007-09-10 13:30:26] INFO
2007 Jul 14
2
Using Helpers inside a Controller
I want to use helpers inside a controller method for an AJAX
application. After the page is loaded and displayed, there will be an
asynchronous javascript request to load additional resources such as
html forms and other data.
The controller which handles the request will collect the resources and
send them back in json format.
def get_resources
data=Hash.new
data[:form1]=form_helper1()
2009 Mar 22
5
How does view know about instance vars set in controller?
Hi,
I know that the AWDWR says to believe in magic and to not spend Xmas
with people asking this question, but really how does it work under the
hood?
I was looking at the source code of crummy, and it seems that
instance_variable_set and instance_variable_get may be part of the
answer. Is there some resource on that or do I have to dive into Rails
code?
--
Posted via
2007 Jun 21
1
render :partial => :url - is it possible?
Hi, this is my first post to the list. I''m still learning the rails
framework, having done most of my previous web development in PHP. I''ve
done a bit of googling for the answer to this question, but maybe I''m
just lacking the right word to search for.
Several parts of my site, such as sidebar components, are
self-contained, modularized and re-used in several parts
2007 Feb 19
2
help - how to call java classes from controller
hi,
I need help to call java classes from the a controller action. I can
call a java class from a ruby script, but when I am trying to call in
controller, then
require ''java''
itself gives me load error.
I have java 1.4, jruby 0.9.0 and ruby 1.8.5 installed.
I have tried to start server as :
jruby script/server but it does not work.
In my application I need to use 3rd party
2007 Jun 30
3
return custom http responses from a controller?
Is it possible to have a response to the browser triggered prematurely
in a controller? like before rails does all it''s internal processing?
also if so can I change the content-type for the response?
thanks
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
2007 Sep 19
3
link_to method of different controller
I want to link to a method of a different controller. I thought I new
how to do this but the code that I have is not working:
<%= link_to ''Welcome Page'', { :action => ''index'', :controller =>
''music_controller'' } %>
Any ideas, thanks
~S
--
Posted via http://www.ruby-forum.com/.
2007 Sep 12
10
Need help refactoring a controller, perhaps add threading?
Good morning,
I''ve been working on my first Rails app. I''m replacing an old Perl
script that scrapes a bunch of data from an Oracle database, generates a
bunch of charts then builds a static webpage with the charts.
I''ve re-built it in Rails, with about 25% of the code it took to do in
Perl and the users can now get dynamic charts instead of day old charts
(or
2007 Jun 24
2
howto make "logged_in?" accessible to other controllers? aaa
Greetings,
I am new to act as autenticated and was wondering how i can check if the
user has been logged in from their account. i would like to do this so
i can show things a member can do in the main site (vote, comment, etc)
thanks!
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
2006 Nov 02
4
application controller security
Shouldn''t everything in the application controller be protected by
default?
I just realized that my app can be called like this:
www.myapp.com/application/method and it actually tries to run that
method inside my application controller.
Is everyone else just adding "protected" at the top?
Thanks,
Chad
--~--~---------~--~----~------------~-------~--~----~
You received this
2007 Nov 19
2
Help with controller and view
I have the following models
class Recipe < ActiveRecord::Base
has_many :ingredient_recipes
has_many :ingredients, :through => :ingredient_recipes
end
class IngredientRecipe < ActiveRecord::Base
belongs_to :ingredient
belongs_to :recipe
end
class Ingredient < ActiveRecord::Base
has_many :ingredient_recipes
has_many :recipes, :through => :ingredient_recipes
2007 May 22
2
Refactoring controllers vs. actions
I just completed an exercise of breaking down an existing project and
mapping out the controllers and actions, then re-factoring them into
some perhaps more RESTful. Though I could be wrong since I am still
grasping REST.
Most of the controllers mapped perfectly into a REST structure, except
for a few.
I have Messages, which can respond to all the usual actions, plus a few
more. The extras are