Displaying 12 results from an estimated 12 matches for "some_controller".
Did you mean:
home_controller
2006 Jun 15
3
Need help creating a clever route
What I want to do is wrap all the scaffolded administrated pages for my
webapp into an admin folder in the controllers and views folders.
So...
/app
/controllers
/admin
issue_controller.rb
article_controller.rb
topic_controller.rb
... etc. ...
/views
/admin
/issue
_form.rhtml
edit.rhtml
list.rhtml
new.rhtml
2006 Jan 22
6
*Very* basic layout question
I''m trying to use a different layout for just one action in my
controller, all the other actions use the application.rhtml layout, so
what i''m doing is ...
class SomeController < ApplicationController
layout "simple", :only=> :some_action
......
end
and the "simple" layout is applied to all the actions, can someone
please give me a hint?
2006 Jun 09
4
app at root domain
I have my app up and running at www.domainname.com/controller/ ... but
need to get it set up at just www.domainname.com
I see that by default, rails is loading the pre-made index file in the
/public dir. How can I override this without changing any directories
around in my app?
Thanks!
-stirman
--
Posted via http://www.ruby-forum.com/.
2006 Mar 10
3
External controller code
Hey,
we like to realize a RoR project with a huge amount of controller code.
What is the best way to handle that.
Is there a similar mechanism for helper as for views or a way to
include/load external code?
Otmar Tschendel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060310/789a3fad/attachment.html
2008 May 10
0
can javascript handle 422 response
...:before => "Element.show(''spinner-
#{object.id}'')",
:complete => "Element.hide(''spinner-
#{object.id}'')",
:with => "this.name + ''='' + this.checked" )
end
some_controller.rb: ...............................................................
@response = Response.find(params[:id])
respond_to do |format|
if @response.update_attributes(params[:response])
flash[:notice] = ''Response was successfully updated.''
format.html { redirect_to(@response) }...
2006 Aug 14
3
php include() equivalent
Is there an equivelent ruby function that is similar or exactly the same
as the php include() function? I would like to be able to include a
header for my RoR web application that refers to a url. Thanks!
-Gilles
--
Posted via http://www.ruby-forum.com/.
2005 Dec 28
3
Module loading
I''ve looked high and low for the answer to this and can''t seem to find
anything that helps.
I have an admin section (much like Typo) where all controllers are based
on the Admin::BaseController.
My directory structure is
[RAILS]
-app
--controllers
---admin
----base_controller.rb
----products_controller.rb
Products controller is:
class Admin::ProductsController <
2008 Jan 21
3
A method accessible from all controllers and views ? How ?
Hi,
I''ve got this method :
def is_admin?
@current_user && @current_user.admin == 1
end
I want to be able to call this method from all my controllers and all my
views.
If I put this method in application_controller I can call it from all my
controllers but none of my views.
If I put this method in application_helper I can call it from all my
views but none of my controllers.
2006 Jun 08
8
Routing help.... it is so difficult!
hi guys, sorry to trouble you all but i really dont understand how this
routing thing work... it seems easy but it just dont work for me!
here''s the situation :
my url b4 : http://127.0.0.1:3001/admin/login
my url after: http://127.0.0.1:3001/burninglegion/admin/login
i wanna do something like this so i went to the routes.rb and type this:
ActionController::Routing::Routes.draw do
2006 Apr 13
2
Dynamic finder conditions
...hash)
end
def conditions_from_hash(some_hash)
condition = ''''
some_hash.each_pair {|key, value|
if value.empty?
next
end
condition << "#{key} LIKE ''%#{value}%'' AND "
}
condition[0..-5].to_s
end
--some_controller.rb
def list
paginator_options = {:per_page => 10}
conditions = dynamic_conditions_from_hash(params, Item)
unless conditions.empty?
paginator_options.merge!({:conditions => conditions})
end
@item_pages, @items = paginate :items, paginator_options
end
Thanks, and...
2006 Apr 18
7
Connecting to multiple databases
Hi Everyone,
I am trying to connect to multiple databases and followed along the
Recipe in Chad Fowlers ''Rails Recipes'' book (which basically is about
establishing the connection in a subclass of ActiveRecord::Base, and
inheriting all classes in need of this connection from this class)
Chad Fowler says:
"You won''t be able to instantiate an External, of course,
2005 Dec 29
8
First module gives "unknown action"
Hi, I''m using "Agile Web Dev. w/Rails", which is great but has a minimum
on grouping controllers into modules. I''ve successfully generated a
module scaffold, so I have:
app/controllers/admin_controller.rb
app/controllers/admin/things_controller.rb
(And the rest of the scaffold output, which seems normal.) However,
browsing to http://localhost:3000/admin/things/