7;t
necessarily true. So starting with 0.8.0 the X-properties are
represented by an array of property objects.
THIS MAY BREAK SOME APPLICATIONS, but the adaptation should be easy.
- No changes other than a version number bump. github seems to
have failed to notice the commit of
On Fri, Nov 26, 2010 at 12:42 PM, Frederick Cheung
wrote:
>
>
> On Nov 26, 4:13 pm, Rick DeNatale wrote:
>> On one of the many Rails projects I've worked on over the years, I
>> seem to recall using either a helper or a method on a model to
>> generate a css id
s was part of rails, or from a plugin or
something specific to the project.
I've failed to find anything like this in the rails docs.
Any ideas what this might have been?
--
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Github: http://github.com/rubyredrick
Twitter: @RickDeN
ling to contribute. I'll recognize any contributors in my
talk, unless they choose anonymity.
http://pledgie.com/campaigns/13677
And if anyone has a (preferably long-term) job opportunity for a very
experienced OO Programmer and Rubyist, I wouldn't mind hearing from
you.
--
Rick DeNatale
t the comment resources isn't nested and it would post
to the uri path 'comments' but the way the routes are specified this
isn't going to work.
Does that make sense?
--
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Github: http://github.com/rubyredrick
Twit
ls, it started out
as a patch/plugin from some Rails user and eventually got assimilated
into the Borg^h^h^h^h^h^h^h^hRails.
--
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Github: http://github.com/rubyredrick
Twitter: @RickDeNatale
WWR: http://www.workingwithrails.com/pers
ance of it's metaclass
so it isn't an instance of ApplicationConrtroller or one of it's
subclasses.
Use the Module#< method
UsersController < ApplicationController
which returns true if the argument is one of the receivers ancestors,
there is also Module#<
http://talklikeaduck.denhaven2.com/2010/06/25/making-rspec-rake-and-bundler-play-well-together
Note this is for Rails 2.3, not sure if Rails 3 and Rspec 2 would be different.
--
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Github: http://github.com/rubyredrick
Twitter: @RickDeNatale
hippingCharge',
:conditions => {:type => %w(ContainerCharge
HandlingContainerCharge ShippingContainerCharge)}
--
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Github: http://github.com/rubyredrick
Twitter: @RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-den
app?
I'd set the rails app to accept http basic authorization over https,
and have the mobile app store the user's password.
--
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Github: http://github.com/rubyredrick
Twitter: @RickDeNatale
WWR: http://www.workingwithrails.com/person
ted_attributes_for :fact_values, :reject_if =>
:not_updatable_fact_value
def not_updatable_fact_value(attrs)
attrs[:id] != anointed_fact_value_id
end
end
--
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Github: http://github.com/rubyredrick
Twitter: @RickDeNatale
WWR: http://
ly
should be parent_id (based on convention assuming that
a category belongs_to :parent)
So I think you want something like this javascript:
post_params="category[name]="+name+"&category[notes]="+notes+"&category[parent_id]="+parent_nid+"&authenticity_token
But since you're using rails and have active support you could do
if (current - 10.minutes) > previous
HTH
--
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Github: http://github.com/rubyredrick
Twitter: @RickDeNatale
WWR: http://www.workingwithrails.com/person/902
)
or something else?
--
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Github: http://github.com/rubyredrick
Twitter: @RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linkedin.com/in/rickdenatale
--
You received this message because y
e the name to the ip address so
you can use it in the browser urls.
Just putting a line in /etc/hosts (or the equivalent if the client is
a doze machine) should be enough.
--
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Github: http://github.com/rubyredrick
Twitter: @RickDeNatale
WWR: h
is the latest version installed. but
rails _1.2.6_
will run version 1.2.6
HTH
BTW, the OP gave rails version 1.3.5 as a example, as far as I know
this a fictitious version since rails went from version 1.2.6 to
version 2.0.0
--
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Github:
! :-)
>
The id gets assigned automatically when a new record is saved, and
create saves the record.
def comment
@user = User.find(session[:user_id])
Blogpost.find(params[:id]).comments.create(:body =>
params[:body], :user => @user)
...
--
Rick DeNatale
Blog: http://talkl
veRecord::Base).
So if you only have a single model/table in the database, then just
use 1 and not 2, I think.
HTH
--
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Github: http://github.com/rubyredrick
Twitter: @RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-
thing which I noticed but decided
not to mention in trying to attack his question directly.
--
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Github: http://github.com/rubyredrick
Twitter: @RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linked
t;
> Suggestions? Am I doing this the right way?
Maybe if you restricted the format of the topic_id
map.forums_show_topic 'forums/:forum_id/:subsection_id/:topic_id',
:topic_id => /\d+/, :controller => 'topics', :action => 'show'
--
Rick DeNatale
Blog:
lace a comment.
Login
Submitted by: rover
You have one tag and two tags, which isn't balanced.
This appears to be consistent for each post.
I would guess you want that last closing div tag and not the one 4 lines above.
I suspect that this is in _post.html.erb
HTH
---
Rick De
e the responsibility of the
model, not the controller.
You're still updating the record, the difference is what happens when
you do. The typical way to do this would be to use something like a
before_save callback on the model to save the old version.
You might want to look at something li
ny :through associations
https://rails.lighthouseapp.com/projects/8994/tickets/1152-support-for-nested-has_many-through-associations
There appears to be a plugin, although I've never used it personally.
http://github.com/ianwhite/nested_has_many_through
--
Rick DeNatale
Blog: http://talklikea
vs production environment question.
Rails in general loads missing constants when referenced. The
difference in the development environment is that it cleans them out
between requests.
Why do you need to use const_defined? Just refer to the class by name
and let Rails do it's thing.
--
d]) # or some other code to get a
particular post
david = User.find_by_userid("david") # or some other code to get a
particular user
some_post.comments.by_user(david).count
--
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Github: http://github.com/rubyredrick
Twitte
rom the DB representation, and will make
changes down the road like changing the database schema to allow
multiple artist compilations to be represented, when you will change
the belongs_to and has_many relations in Record and Band to either
has_and_belongs_to_many or has_many :through associations
mments.size
will do a sql query like
SELECT count(*) AS count_all FROM `users` WHERE (`users`.account_id = 42)
and return the value of count_all
HTH
--
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Github: http://github.com/rubyredrick
Twitter: @RickDeNatale
WWR: http://www.
to something like Person since Driver and Passenger are really roles,
not entities.
class Person < ActiveRecord::Base
belongs_to :car
end
class Car < ActiveRecord::Base
belongs_to :driver, :class => ;person
has_many :passengers, :class => person
end
--
Rick DeNatale
Blog:
apture the way I want
> them to. I can do it using Ruby to generate a bunch of consecutive
> \d{1,5} groups to satisfy my requirement, but some insightful Regexp
> markup is preferable.
>
> Any ideas?
Does this help?
BigDecimal("0.141421356237").to_s.scan(/(
/martinfowler.com/articles/rake.html
A much more recent tutorial, with some more links at the end:
http://jasonseifer.com/2010/04/06/rake-tutorial
--
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Github: http://github.com/rubyredrick
Twitter: @RickDeNatale
WWR: http://
s is the publisher of
"The RSpec Book", which really should be called the RSpec and Cucumber
book, constitutes an endorsement of RSspec and Cucumber.
But then as they say in Rome, de gustibus non est disputandum! Use
your intellectual seeds as you will.
--
Rick DeNatale
Blog: http://talkl
mespace chain and looks for
SampleLog::Sample.
Now rails looks for sample_log/sample.rb and finds it, and loads it,
and then checks to see whether SampleLog::Sample is now defined, which
it isn't because that file defined ::Sample instead.
Did you try just moving app/models/sample_log/sampl
,
> Nitin.
> --
> 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-t...@googlegroups.com.
> To unsubscribe from this
the value of the last expression.
Which is why ending a method with a variable name doesn't do nothing,
as Joshua seems to think, it provides the result of the method.
And it IS standard ruby practice.
--
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Github: http://github.com/r
.13.3/lib/action_view/helpers/capture_helper.rb:108:in
> `capture_erb_with_buffer'
>
That's an OLD version of Rails!
Not sure what's going on but it appears that id is being sent to
whatever the @plat instance variable is referring to, and that is
somehow doing a write.
What do
validates_presence_of :part_id
The association name is :part not :part_id
so
validates_presence_of :part
HTH
--
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Github: http://github.com/rubyredrick
Twitter: @RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-
will fix this.
If not then show us the walkback you get on the error, it should point
to some piece of code which is referring to some constant
(name_space::)*Sample
--
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Github: http://github.com/rubyredrick
Twitter: @RickDeNatal
:ModelA (NameError)"
>
> The 'ModelA' is the model I'm trying to access, and 'ClassA' is the
> class in /app/lib/class_a.rb. I'm not sure why it seems to think that
> ModelA is a part of ClassA, perhaps that's the problem?
Shouldn't it be in
{
already use delicious api ?
> someone can help me ?
>
I've never done it myself but
http://delicious.com/help/thirdpartytools
has a couple of Ruby bindings for the delicious API
HTH
--
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Github: http://github.com/rubyred
tring :hashed_password
> t.string :salt
> t.string :status
> t.string :phone
> t.string :email
> t.integer :station_id
> t.timestamps
> end
> end
>
> def self.down
> drop_table :users
> end
> end
>
--
Rick DeNat
, Date.today])
You might want to look at
http://github.com/radar/by_star
Just discovered this in the past few days.
--
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Github: http://github.com/rubyredrick
Twitter: @RickDeNatale
WWR: http://www.workingwithrails.com/person/
cts/forum/a/b/c"}
So instead of breaking it down to an array it just gives you the whole string.
Some caveats.
1) Although the existing routes still work since I put this at the end
of the routes, unless this is the only controller you have you might
want to 'anchor' such urls w
o the "stations_users" table.I hav used scaffolding 4 creating these
> two models.How can i insert the fields for the join table also when a
> user is created?
> Can any one help me?
Not sure that this is your problem, but I wouldn't be surprised.
--
Rick
to metered_usages
2. class MeterUsage
belongs_to :service_address
belongs_to :metered_service
end
class ServiceAddress
has_many :metered_usages
has_many :metered_services, :through => :metered_usages
end
class MeteredService
has_many
cords won't be evenly distributed because the probability of
selecting a particular record is proportional to the difference
between it's id and the id of the preceding existing record if any, or
0.
--
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Github: http://github.com/ruby
the time the
association declaration is executed (during class definition time). If
you want to use the value at the time you make the query, it needs to
be a lambda so that the value gets evaluated each time.
HTH
--
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Github: http://github.co
il },
content_tag(:li) { link_to("Edit profile",
edit_user_path(:current)) },
content_tag(:li) { link_to("Logout", logout_path) }]].join
else
[content_tag(:li) { link_to("Login", login_path) },
content_tag(:li) { link_to(&quo
On Fri, Apr 16, 2010 at 9:16 PM, Me wrote:
> StringIO#request.body says StringIO in the log file.
>
> On Apr 16, 7:40 pm, Rick DeNatale wrote:
>> On Fri, Apr 16, 2010 at 8:34 PM, Me wrote:
>> > I am trying to get the body of the request coming in to the
>> &g
On Fri, Apr 16, 2010 at 8:34 PM, Me wrote:
> I am trying to get the body of the request coming in to the
> controller. request.body is a StringIO object. I cannot seem to see
> what is actually inside it. any ideas?
StringIO#string
--
Rick DeNatale
Blog: http://talklikeaduck.
p.com/projects/30941/tickets/21
exception-when-count-option-used-to-enumerate-non-recurring-event
--
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Github: http://github.com/rubyredrick
Twitter: @RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn:
-when-count-option-used-to-enumerate-non-recurring-event
--
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Github: http://github.com/rubyredrick
Twitter: @RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linkedin.com/in/rickdenatale
--
You rec
it this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>
--
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Github: http://github.com/rubyredrick
Twitter: @RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www
7/type/6368-job-developpeur-ruby.html/fr/
>
J'aime Paris, mais, je suis desolé, j'habite en Caroline du Nord.
--
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Github: http://github.com/rubyredrick
Twitter: @RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-
from another
branch NOT to be run. But...
If you run
rake db:migrate:down version=XXX
and then remove the file db/migrate/XXX_whatever from your source, the
rake task won't see it and it will be gone.
--
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Github: http://github.com/
ets for different projects.
http://rvm.beginrescueend.com/
http://www.railway.at/2010/02/13/avoiding-rails-3-dependency-hell-with-rvm/
--
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Github: http://github.com/rubyredrick
Twitter: @RickDeNatale
WWR: http://www.workingwithrails.com/person/
T recommended for use with Rails3 beta
2, they want us to use the latest pre-release version of 1.9.2
instead.
--
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Github: http://github.com/rubyredrick
Twitter: @RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
Lin
re the rails app ever
sees them.
--
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Github: http://github.com/rubyredrick
Twitter: @RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linkedin.com/in/rickdenatale
--
You received this me
hod `each' for "":String
I'm guessing that you are using Ruby 1.9, Ruby 1.8 had a String#each
method, Ruby 1.9 does not, you need to use each_line instead.
--
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Github: http://github.com/rubyredrick
Twitter: @RickDeNatale
codes table.
And it creates the association called code which the error message is
complaining about.
> On Mar 30, 1:05 pm, Rick DeNatale wrote:
>> On Tue, Mar 30, 2010 at 3:03 PM, khagimoto wrote:
>> > I'm trying to replicate a join in RoR that I can do in SQL
ey => "activity_type"
end
Activity.find_all_by_user_id(1, :include => :code)
This will return a collection of all of the activities for user#1 with
attached instances of the code for each activity
--
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Twitter: http://twitter
rected to
> login page...Now after getting logged in successfully user must be
> redirected to the 'Posts' page again so that now he can add new post..
>
In a controller you can do request.url
--
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Twitter: http://twitter.com/Ric
On Thu, Mar 18, 2010 at 7:57 AM, Rails Fun wrote:
> so what is the best way test bed to use for a rails project?
> i'm thinking of using Rspec and Cucumber, but where do you do the unit
> tests? in Rspec?
Yes
--
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
o add the comment or
> not.
A more conventional approach here might be to treat comments as nested
resources, and have a Comments controller.
http://railscasts.com/episodes/139-nested-resources
And if you substitute Story for Article in Ryan's example app in the
railscast, it would appe
entable rather than attachable
as the association name, which I think makes a bit more sense, and is
less likely to collide if you decide that one or more of the models
which can have comments can also have uploaded files as attachments.
--
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
e: message/external-body; access-type=URL;
> URL="http://www.foo.com/file";
>
> Content-type: text/html
> Content-Transfer-Encoding: binary
>
> THIS IS NOT REALLY THE BODY!
Not tested:
attachment :content_type => "message/external-body; access-
what point they were introduced.
HTH
--
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Twitter: http://twitter.com/RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linkedin.com/in/rickdenatale
--
You received this message because you are
the actor would say he HAD two names, and
his first name was "Robert" and his last name was "De Niro"
--
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Twitter: http://twitter.com/RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: h
On Fri, Mar 5, 2010 at 2:12 PM, Jack Shanter wrote:
> Rick Denatale wrote:
>> Why not
>>
>> pages = Page.all(:include => :book)
>
> I usually need to filter by, let's say, a certain library:
>
> @pages = Page.all(
> :select => 'pag
n a block of text.
Some other cases to consider
John Phillip Sousa (or if you're a kid a heart John Jacob Jingelheimer
Smith) not to mention Spanish names which can have MANY parts.
Robert De Niro
Jesus Mary and Joseph
Surnames with origins in some languages don't start with a capita
On Fri, Mar 5, 2010 at 8:12 AM, mac wrote:
> 3) def new
> �...@content_master = ContentMaster.new
> �...@metadata = @content_master.metadata.build
@metadata = @content_master.build_metadata
>
--
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Twitter: http:/
On Fri, Mar 5, 2010 at 9:07 AM, Jack Shanter wrote:
> Thanks, Fred. I suppose I'll stick with views and conversions.
Why not
pages = Page.all(:include => :book)
pages.first.book.year
--
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Twitter: http://twitter.com/RickD
rd-code comment.user_id to a known value to
> check that when there *is* a user on the comment, the view displays
> correctly. Then you can go back and make sure the comment is being
> built properly.
It might also be an ideal to add
validates_presence_of :user
to the comment model
and
y ideas?
m[0] doesn't return the string being searched, it returns everything
which the entire pattern matched.
In the first case /(.+[aiu])(.+[aiu])(.+[aiu])(.+[aiu])/i entirely
matches "Fujiyama"
in the second case /noun/i only matches a portion of the string, so
that's wh
what could have happened?
--
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Twitter: http://twitter.com/RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linkedin.com/in/rickdenatale
--
You received this message because you are subscribed to th
> end
>
> module ClassMethods
> def acts_as_item(options = {})
> configuration = {:option=>:value}
> class_eval {
> include InstanceMethods
>
> def self.configuration
I think you want this to be
def configuration
kday IN ?", weekdays_selected)
If it were me I might think about tweaking this a bit and use 7
instead of 0 for any day, since Ruby's Date and Time use 0 for Sunday
through 6 for Saturday.
Caveat, none of the above code has been tested, and I've only had two
sips of coffee this
tiveRecord::StatementInvalid exception, which you'll need to rescue
and do something like telling the user of the conflict so that he can
resolve it.
--
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Twitter: http://twitter.com/RickDeNatale
WWR: http://www.workingwithrails.com/pers
ction_id/add_date/:date',
:controller => 'actions', action => 'add_date'
And then:
link_to "Add", add_date_to_action_url(@action.id, Date.today.to_s)
--
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Twitter: http://twitter.com/RickDeNatal
n.
but you should be able to do something like
rdebug script/server
which will give you control in the debugger at the beginning.
--
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Twitter: http://twitter.com/RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
Lin
'require "rubygems";p require "linguistics.rb"'
-e:1:in `require': no such file to load -- linguistics.rb (LoadError)
from -e:1
$ruby -rubygems -e'p require "linguistics.rb"'
true
$ruby -e'require "rubygems";p
n these
> days? Does thin plays nicely with Rails3? What is your latest
> experience on this?
>
> Thank you very much for the insights.
For production I'd use Passenger (a.k.a. modrails) with Ruby 1.9.
Should work fine with Rails3 since it drives the rack inte
ust the exception message, maybe
somebody will have a better chance to help.
--
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Twitter: http://twitter.com/RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linkedin.com/in/rickdenatale
--
e session, and/or a token, and or via basic
http authentication depending on the requirements of the application,
and redirects to the login url if not.
--
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Twitter: http://twitter.com/RickDeNatale
WWR: http://www.workingwithrails.com/pers
On Thu, Feb 11, 2010 at 9:47 AM, Jeff wrote:
> Definitely ignore as many conventions as you can, and thereby make
> development as hard as possible on yourself.
>
Ah yes, Consternation over Convention!
--
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Twitter: http://tw
path],
['Contact Us', contact_us_path ]
].map {|tab_name, target | tab_link(tab_name, target)}.join("\n")
In the view:
<%= navigation_bar %>
Again this is probably not exactly the code I'd come up with, but it's
close to what you started with and adhe
A lot of water has flowed under the Rails "Bridge" since then, it's
probably a wise course to look for more up-to-date tutorials, one good
place to start would be
http://guides.rubyonrails.org/
But make sure you are following the "current release version"
the to_date in the expression.
>> def initialize(date)
>> @date = date
>> end
>> attr_reader :date
>> end
=> nil
>> things = [Date.today, 2.days.from_now, 5.days.ago].map {|d| Thing.new(d)}
=> [#,
#,
#]
>> things.group_by {|t| t.date.to_da
which version you've selected.
Actually I lied a little bit. The only difference is that if you
click the Current Release Version link the title just above says
Ruby on Rails guides
and when you click on Edge Version it changes to:
Ruby on Rails Guides
Which I guess makes it perfectly clear
On Mon, Feb 1, 2010 at 10:20 AM, Frederick Cheung
wrote:
> On Feb 1, 3:11 pm, Rick DeNatale wrote:
>> No, helper methods are indeed methods. They are defined in modules,
>> and those modules are included into views by the controllers, and can
>> be explicitly incl
er::Base#helper method (which in Rails 2.x is actually
defined in the module ActionController::Helpers.
It's not uncommon for a Rails app to invoke
helper :all
in its ApplicationController which includes all helpers in the
app/helpers directory and it's subdirectories in the orde
ent by other
> means?
As I understand it, Rails 3 is making generators and app templates
work on the same code base.
<http://caffeinedd.com/guides/331-making-generators-for-rails-3-with-thor>
<http://benscofield.com/2009/09/application-templates-in-rails-3/>
--
Rick DeNatale
y field validation
you'll come up with serveral plugins for both frameworks.
--
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Twitter: http://twitter.com/RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linkedin.com/in/rickdenatale
-
th values which have to be
seen between requests is to either put them in some persistent storage
on the server (e.g. the DB, SQL or noSQL), or in the session and let
the browser give it back to you.
--
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Twitter: http://twitter.com/R
ower
> in /loans/new ???
### Idea 3 ###
Loan
belongs_to :lender, :class_name => "User"
belongs_to :borrower, :class_name => "User"
User
has_many :lendings, :class_name => "Loan", :foreign_key => :lender_id
has_many :borrowings, :class_name =&
uch.
There IS a git users group on google groups:
http://groups.google.com/group/git-users
--
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Twitter: http://twitter.com/RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linkedin.com/in/
gt;
> In Unix:
> rake aborted!
> no such file to load -- Decode
Case sensivity in the file name? Most operating systems, unlike
WIndows treat file names, "Decode.rb" and "decode.rb" as different.
--
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Twitter: ht
ich scopes the find to the user's friends. Similar comment for
other actions like edit and update
--
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Twitter: http://twitter.com/RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linkedin.co
Owner belongs_to :widget
Widget has_one :owner
with the concommittant db table changes.
Then
@owners = Owner.all(:conditions => 'widget_id IS NULL')
would work.
--
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Twitter: http://twitter.com/RickDeNatale
WWR: http://www.wor
t; Posted viahttp://www.ruby-forum.com/.
>
> As far as you know you can't.
Sure you can:
map.resources :users, :except => [:delete, :update]
there's also an :only option
--
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Twitter: http://twitter.com/RickDeNatale
WWR: htt
mission_fields.check_box :admin %>
<% end %>
<% end %>
So just like form_for doesn't do any iteration, neither does fields_for.
Since you haven't told us any more about what you want to do, I don't
know how to help any further.
--
Rick DeNatale
Blog: htt
1 - 100 of 253 matches
Mail list logo