December 2, 2008
Posted by roadburn
All Posts Tagged ‘
rails 2.0’
October 28, 2008
Posted by roadburn
Rails testing with shoulda
$sudo gem install thoughtbot-shoulda
make sure rubygems is updated or you will hit an error
http://www.thoughtbot.com/projects/shoulda
http://dev.thoughtbot.com/shoulda/
Cheat Sheet
http://kylebanker.com/blog/2008/09/shoulda-testing-cheat-sheet/
September 23, 2008
Posted by roadburn
Restful_authentication Internet explorer cannot logout http_basic problem
If you’re getting a security box popup like I did, here’s the link to the solution
Basically, just edit /lib/authenticated_system.rb, and add ‘(:xml, :json)’
def access_denied
respond_to do |format|
format.html do
store_location
redirect_to new_session_path
end
format.any(:xml, :json) do
request_http_basic_authentication ‘Web Password’
end
end
end
Make sure your <head> tag has this too:
<META HTTP-EQUIV=”Pragma” CONTENT=”no-cache”>
<META HTTP-EQUIV=”Expires” CONTENT=”-1″>
September 21, 2008
Posted by roadburn
Rails Pagination
From :
http://github.com/mislav/will_paginate/tree/master
Installation
1 | $script/plugin install git://github.com/mislav/will_paginate.git |
Usage
@posts = Post.paginate :page => params[:page], :order => 'created_at DESC' #In the view, page links can be rendered with a single view helper: <%= will_paginate @posts %>
July 9, 2008
Posted by roadburn
Active Scaffolding
Activescaffold website:
http://activescaffold.com/
Get Activescaffold:
http://github.com/activescaffold
Using File Column plugin:
http://www.42.mach7x.com/2007/10/17/file-column-plugin-with-activescaffold-upload-branch/
Active Scaffolding Tutorial
http://www-128.ibm.com/developerworks/linux/library/l-activescaffold/
Active scaffold for Rails 2.1
http://github.com/robd/active_scaffold/commits/rails-2.1
Recordselect to search and select records
July 8, 2008
Posted by roadburn
Learn rails 2.0
http://railsonedge.blogspot.com/2008/02/rails-forum-tutorial-for-beginners-part.html