Displaying 20 results from an estimated 20 matches for "ryandaigle".
2011 Apr 09
4
API documentation for find_in_batches
Hello,
At guides.rubyonrails.org I read about the possibilities of
find_in_batches. However I cannot find this option anywhere in the API
documentation (api.rubyonrails.org).
My question: where should I look for the documentation of this
command?
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email
2008 Jun 03
1
Rails 2.1 and default setting of Partial updates
I just updated to 2.1 and created a new, empty project. According to the
docs I''ve seen, including:
http://ryandaigle.com/articles/2008/4/1/what-s-new-in-edge-rails-partial-updates
The file config/initializers/new_rails_defaults.rb has the default
setting for partial updates and just needs to be edited: "Note: There''s
currently a config/initializers/new_rails_defaults.rb file that has this
setting,...
2007 Mar 01
4
Cookie based session management problems
...pleasant surprise when
I synced up, fired up my app, and nothing worked. Ah, life on the edge.
I''m sure I''m just missing something, but I can''t get sessions to survive
the first redirect. I added the following code to environment.rb, based
on Ryan''s (http://www.ryandaigle.com/) note:
config.action_controller.session = {
:session_key => ''_<%= app_name %>_session'',
:secret => ''<%= CGI::Session.generate_unique_id(app_name) %>''
}
The problem is probably related to the fact that the embedded ruby is
not get...
2006 Jul 01
3
help me understand rest
I am having a heck of a time understanding the new rest craze in rails.
what I think I understand so far:
1 rest is about the way we use http to access information on the
internet.
2 http was created with nouns and verbs in mind, but the only verbs that
are supported in browsers and server software today are ''post'' and
''get''. Other useful verbs include put
2006 Jul 20
1
Model CRUD via web services
Hello,
I was wondering if there was any automated (may be scaffolding) way of
exposing Model CRUD via web services.
I found this ticket for django, but nothing for Rails.
http://code.djangoproject.com/ticket/115
Thanks in advance for your opinions and suggestions.
Regards.
--
Surendra Singhi
http://ssinghi.kreeti.com, http://www.kreeti.com
Read my blog at:
2006 Jun 15
1
new features
Hi All,
I''m wondering if there is a resource where I can follow the new
features in 1.0 easily. The list is too crowded, wiki is too
unorganized, change log doesn''t look "convincing". Is there any site
which follows rails development?
Regards,
Oyku.
2007 Jul 22
1
html.erb and textmate. Cant get snippets to work.
Hello!
I moved to html.erb but the snippets fail to work.
eg
.rhtml
lia(tab) gives me link_to
.html.erb
lia with a tab after it =)
I have tried the comment suggested here:
http://ryandaigle.com/articles/2007/2/21/what-s-new-in-edge-rails-rhtml-and-rxml-to-die-a-slow-and-painful-death
David Demaree:
"
1. Select Bundles > Bundle Editor > Edit Languages... from the menu bar.
2. Find and un-collapse the Rails bundle in the left-hand list. 3.
Select the ''Ruby on Rails&...
2008 Jul 23
2
difference between html.hi to evererb &rhtml
hi to everyone whats the difference between html.erb & rhtml
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this
2009 Jul 07
1
Adding data in two tables simul;taneously with Validations
Hi All,
I have 2 tables
1] user_infos &
2] users
class UserInfo
has_one :user
validates_presence_of :city
class User
belongs_to :user_info
validates_presence_of :first_name
i write following code in my create method.
@user_info = UserInfo.new(params[:user_info])
@user=@user_info.build_user(:first_name=>'''')
if @user_info.save
else
end
now what i want is to
2009 Jul 28
1
Rails date conversion
The environment.rb file in a Rails 2.3.2 app says:
> Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
Auto-convert to this zone... when?
Also, what are the differences between these two statements?
config.time_zone = xxx
config.active_record.default_timezone = xxx
I ask these questions because I have a scenario whereby an AR-backed
object, when
2010 Feb 09
1
Eager Loading
Is there a way to specify within a model that an association should
always be loaded. For example, the classic example from the API docs:
Post.find(:all, :include => :author)
What if I ALWAYS wanted the author to be loaded whenever a Post object
was created? So, in essence, Post.find(:all) would bring back each
post with the associated author object already loaded.
Thanks!
--
You
2008 Jun 24
1
Rails 'rake gems:install' error in windows
I am developing with rails at three platform
mac, windows, linux.
until Rails 2.1, we can describe gem dependencies in environment.rb.
( this one ~
http://ryandaigle.com/articles/2008/4/1/what-s-new-in-edge-rails-gem-dependencies
)
so I write environment.rb like below for using will_paginate
...
config.gem ''capistrano''
config.gem ''mislav-will_paginate'', :version => ''~> 2.3.2'', :lib =>
'...
2006 Jun 07
4
Edge rails and routes
I have a route that works under 1.1.2 but does not work under edge
rails.
route.wishlist ''wishlist/:id'',
:action => ''show_wishlist'',
:id => nil,
:requirements => {:id => /\d*/}
This worked great without an :id, but under edge rails when I call
wishlist_url with no parameters I get:
"Exception: can''t convert nil into
2008 Jan 08
1
howto rebuild a object from a received xml hash structure ?
im my web server app , i have an action to be used as a REST web
service
# GET /user/membership.xml?email=emailaddress
def membership
@user = User.find_by_email(params[:email])
respond_to do |format|
format.xml { render :xml => @user.to_xml( :only =>
[ :first_name, :last_name, :display_name, :membership_type, :membership_at], :skip_types
=> true)}
end
end
my
2006 Aug 01
2
restful controllers - howto nest with link_to?
Hi List,
I''m trying to get my grip on the restful methods that are now part of edge
rails.
Making the first steps was impressive as well as easy because there are
already great resources on the blogs of early adopters:
http://www.ryandaigle.com/articles/2006/08/01/whats-new-in-edge-rails-simply-restful-support-and-how-to-use-itand
http://metaatem.net/2006/07/31/rest-and-rails-no-reason-to-be-scared for
example.
Following these tutorials it''s a piece of cake to setup the first restful
controllers and even get nested routes li...
2008 Feb 01
2
Turning off InvalidAuthenticityToken for a RESTful Service
Hi,
I was trying to write a RESTful service and was planning on testing
via tools such as cURL and the basic http libs. With the
InvalidAuthenticityToken piece that is turned by default in Rails
2.0.2, I have to provide the token with each request. This is
something of a pain for a programmable client that may not make a GET
request before performing other actions, specifically POST, PUT and
2008 Aug 28
12
Rendering User attributes in XML
Let''s say an app has a User, and a User has many friends. Also, let''s
say the app authentication was built on the restful_authentication
plugin, and we have email and password in the Users table. The friends
controller index might look like this;
# GET /users/1/friends
# GET /users/1/friends.xml
def index
@users = @user.friends
respond_to do |format|
format.html
2006 Aug 04
4
REST
...that exists specifically to get either a blank html
form (new) or a product''s edit form (edit) aren''t included.
ActiveResource lets you write code that will properly format requests
to talk to an existing RESTful web service. See Ryan Daigle''s article:
http://www.ryandaigle.com/articles/2006/06/30/whats-new-in-edge-rails-
activeresource-is-here
But the remaining question is, how to you build the server side of a
Rails RESTful app? Lelu is guessing that by Rails 1.2 ActiveResource
will be included with a system that will make it easy for you to
respond to the...
2006 Jul 02
0
Rails Core Weekly June 19 - July 2 2006
...eral go
here:
http://jimonwebgames.com/articles/2006/06/26/dont-say-crud-say-fucd
(I like that one because it speaks of Edgar Codd, who together with
Chris Date are the granddaddies of the relational model)
For a great introduction to Active Resource itself go to Ryan''s blog:
http://www.ryandaigle.com/articles/2006/06/30/whats-new-in-edge-rails-activeresource-is-here
and for a more ''philosophical'' design-issues and applicability view go to
http://blog.hasmanythrough.com/articles/2006/06/30/cruddy-searches
Coda is reacting in a different way:
http://blog.codahale.com/2006...
2008 Jan 06
8
ActionController::InvalidAuthenticityToken
Ruby noob here.
Just installed Rails 2.0, and am having trouble with updating DB
tables, using the ApplicationController.
My ApplicationController file looks like:
class StoryController < ApplicationController
protect_from_forgery :only =>
[:create, :update, :destroy]
scaffold :story
#def index
#@current_time = Time.now
#@story =