Displaying 18 results from an estimated 18 matches for "whentouseget".
2007 Jul 25
5
editing multiple models in one form
...n => ''list'' %>
and my controller file looks like:
class DegreesController < ApplicationController
model :degree
model :assigned
def index
list
render :action => ''list''
end
# GETs should be safe (see
http://www.w3.org/2001/tag/doc/whenToUseGet.html)
verify :method => :post, :only => [ :destroy, :create, :update ],
:redirect_to => { :action => :list }
def list
@degree_pages, @degrees = paginate :degrees, :per_page => 10
end
def show
@degree = Degree.find(params[:id])
end
def new
@degree =...
2006 Jun 16
0
Polling pop3 and adding emails to ticket system
...ail.from[0]
@ticket.title = email.subject
@ticket.description = email.body
@ticket.save
end
end
class TicketsController < ApplicationController
def index
list
render :action => ''list''
end
# GETs should be safe (see
http://www.w3.org/2001/tag/doc/whenToUseGet.html)
verify :method => :post, :only => [ :destroy, :create, :update ],
:redirect_to => { :action => :list }
def list
@ticket_pages, @tickets = paginate :tickets, :per_page => 10
end
def show
@ticket = Ticket.find(params[:id])
#@comment = params[:id]...
2006 Jun 20
0
No opening form tag in rendered HTML
...----------------------------------------------------------------------------
Here is my code:
#Post controller
class PostsController < ApplicationController
def index
list
render :action => ''list''
end
# GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html)
verify :method => :post, :only => [ :destroy, :create, :update ],
:redirect_to => { :action => :list }
def list
@post_pages, @posts = paginate :posts, :per_page => 10
end
def show
@post = Post.find(params[:id])
end
def new
@post = Post.new...
2007 Mar 06
1
link_to, image_submit_tag, "changes only with POST" and "usability without Javascript" question
Hello,
I want to have the following features in my rails application:
1. the program should have AJAX if Javascript available
2. I want to protect my application described in
http://www.w3.org/2001/tag/doc/whenToUseGet.html - means GET should be
safe
3. if Javascript is disabled the application should work too (without
AJAX)
If I use "GET should be safe" option (verify) and link_to with :method
=> ''post'' option these links do not work anymore with Javascript
disabled. My idea was n...
2006 Dec 11
0
auth_generator 2.0.1 undefined method `login_required' for ... ArticlesController
...s/ariticles_controller.rb to read...
------------------------------------------------------------------------
class ArticlesController < ApplicationController
def index
list
render :action => ''list''
end
# GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html)
verify :method => :post, :only => [ :destroy, :create, :update ],
:redirect_to => { :action => :list }
def list
@article_pages, @articles = paginate :articles, :per_page => 10
end
def show
@article = Article.find(params[:id])
end
def new
logi...
2006 Mar 31
7
problem with habtm conditions in pagination
...ongs_to_many :tags
end
class Tag < ActiveRecord::Base
has_and_belongs_to_many :customers
end
class CustomersController < ApplicationController
def index
list
render :action => ''list''
end
# GETs should be safe (see http://www.w3.org/2001/tag/doc/
whenToUseGet.html)
verify :method => :post, :only => [ :destroy, :create, :update ],
:redirect_to => { :action => :list }
def list
@customer_pages, @customers = paginate :customers, {:per_page =>
10, :include => ''tags'', :conditions=>''tag_id...
2008 Aug 31
6
why's my course_duration being reset
...ss EnquiriesController < ApplicationController
layout ''welcome''
before_filter :login_required, :except => [:new, :create, :blank]
def index
list
render :action => ''list''
end
# GETs should be safe (see
http://www.w3.org/2001/tag/doc/whenToUseGet.html)
verify :method => :post, :only => [ :destroy, :create, :update ],
:redirect_to => { :action => :list }
def list
@enquiries = Enquiry.find(:all, :order => ''created_at ASC'')
end
def list_by_start_date
@enquiries = Enquiry.find(:all, :o...
2006 Aug 17
0
super-newb needs help with has_many and other things...
...belongs_to :topic
end
class Comment < ActiveRecord::Base
belongs_to :topic
end
***** Controller: *****
class AdminController < ApplicationController
def index
list
render :action => ''list''
end
# GETs should be safe (see
http://www.w3.org/2001/tag/doc/whenToUseGet.html)
verify :method => :post, :only => [ :destroy, :create, :update ],
:redirect_to => { :action => :list }
def list
@topic_pages, @topics = paginate :topics, :per_page => 10
end
def show
@topic = Topic.find(params[:id])
end
def new
@topic = Topic...
2008 Apr 23
0
self referential (n-n relationship) belongs many controller
...--------------------------------------------------
class TasksController < ApplicationController
helper :sorting
def index
list
@statuts=Statut.find_all
render :action => ''list''
end
# GETs should be safe (see
http://www.w3.org/2001/tag/doc/whenToUseGet.html)
verify :method => :post, :only => [ :destroy, :create, :update ],
:redirect_to => { :action => :list }
def list
@task_pages, @tasks = paginate :tasks, :per_page => 50
@statuts=Statut.find_all
@sorter = SortingHelper::Sorter.new(self, params['&...
2007 Jan 15
2
Help with with displaying a selected list.
...Next page'', { :page => @video_pages.current.next } if
@video_pages.current.next %>
Controller
class VideosController < ApplicationController
def index
list
render :action => ''list''
end
# GETs should be safe (see
http://www.w3.org/2001/tag/doc/whenToUseGet.html)
verify :method => :post, :only => [ :destroy, :create, :update ],
:redirect_to => { :action => :list }
def list
@video_pages, @videos = paginate :videos, :per_page => 10
end
def show
@video = Video.find(params[:id])
end
def new
@video = Video...
2006 Apr 04
3
newbie - HABTM problems writing to Join Table in SQL
...rder => [:day, :month, :year],
:start_year => 1900 %></p>
--------films_controller----------
class FilmsController < ApplicationController
def index
list
render :action => ''list''
end
# GETs should be safe (see
http://www.w3.org/2001/tag/doc/whenToUseGet.html)
verify :method => :post, :only => [ :destroy, :create, :update ],
:redirect_to => { :action => :list }
def list
@film_pages, @films = paginate :films, :per_page => 10
end
def show
@film = Film.find(params[:id])
end
def new
@film = Film.new...
2006 Apr 28
9
[AWDR] Tutorial in A4 wont ''destroy'' items
Hello,
I''m working through the tutorial, and I''ve run into a little snag. In
the first part of the tutorial, the destroy link is not working
correctly. I can''t figure out where I goofed. Removing :confirm doesn''t
seem to resolve the issue.
Thanks,
Randy.
development.log
----->8-----
Processing AdminController#destroy (for 127.0.0.1 at 2006-04-27
2007 Jun 04
3
Expected ... to define (rails version 1.2.2)
Hi, I''m having a mysterious problem that occurs when I''m using Rails
1.2.2. My app works fine when the environment.rb file reads:
RAILS_GEM_VERSION = ''1.1.6''
When I change this to:
RAILS_GEM_VERSION = ''1.2.2''
and try to load http://<mydevhost>:3000/srs/, I get the following
traceback in the developer log:
Expected
2008 Jan 18
3
Please help
...ller
---------------------------------------------------------------------------------------------------------
class PeopleController < ApplicationController
def index
list
render :action => ''list''
end
# GETs should be safe (see
http://www.w3.org/2001/tag/doc/whenToUseGet.html)
verify :method => :post, :only => [ :destroy, :create, :update
],
:redirect_to => { :action => :list }
def list
# wants is determined by the http Accept header in the request
@people = Person.find_all
respond_to do |wants|
wants.html
wants.xml...
2006 Apr 03
5
Strange Problem with ActionController (I think)
I''m working through the Agile Depot example
I have no idea what I did, but when I try and delete something from the
web page I get this error on the log.
Processing AdminController#destroy (for 127.0.0.1 at 2006-04-02
22:28:06) [GET]
Session ID: 4371bd7ca2cb5ec5e08e60a7590df90a
Parameters: {"action"=>"destroy", "id"=>"5",
2006 Aug 12
6
params not getting POSTed
I have a situation where no params are being sent when the form is
submitted.
After the rendering this is the html that I get...
<form action="/stats/new" method="post">
Height: <input id="stat_height_ft" name="stat[height_ft]" size="5"
type="text" />ft </p>
Weight: <input id="stat_weight_lbs"
2007 Aug 17
1
Scaffold (Agile Web Development With Rails)
What am I doing wrong here?
[app/controllers/admin_controller.rb]
class AdminController < ApplicationController
before_filter :authorize
def index
list
render :action => ''list''
end
# GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html)
verify :method => :post, :only => [ :destroy, :create, :update ],
:redirect_to => { :action => :list }
def list
@product_pages, @products = paginate :products, :per_page => 10
end
[app/controllers/admin_controller.rb]
[output]
NoMethodError in AdminContro...
2006 Jun 14
5
uninitialized constant error after scaffold on new Windows XP environment
I am attempting to get a working Rails programming environment setup working
under XP with MySQL, RadRails and Webrick. I have been using my PowerBook
but need to working on Windows environment too.
I have basic functions of Ruby and Rails going. I created a really simple
table and generated the scaffolding. The server starts just fine. I can
browse the database succesfully in RadRails. The issue