never actually used link_to_if, because I haven’t found a
use case for it personally.
--
Tejas Dinkar
http://www.nilenso.com
Nilenso Software (formerly C42 Engineering)
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Core group.
To unsubscribe from
On 28-Nov-2013, at 7:26 am, Nicholas Firth-McCoy n...@nfm.id.au wrote:
p.changed?(name: 'Nicholas') = true
If this is happening, it might be nice to test on both the old and the new value
p.changed?(name: {“Nick” = “Nicholas”})
--
Tejas Dinkar
http://www.nilenso.com
Nilenso Software (formerly
I’ve created a pull request to make this happen.
https://github.com/rails/rails/pull/13131
model.name_changed?(Ringo)
model.name_changed?(John = Ringo)
On 02-Dec-2013, at 9:04 am, Tejas Dinkar tejasdin...@gmail.com wrote:
On 28-Nov-2013, at 7:26 am, Nicholas Firth-McCoy n...@nfm.id.au wrote
On 09-Oct-2013, at 4:17 PM, Ryan Bigg radarliste...@gmail.com wrote:
link_to posts, [student.becomes(User), :posts]
:-( I don't find this very Object Oriented. It actually builds a User Object,
so methods on Student will not work.
Also it's bound to be forgotten
form_for
' if length 1
first
end
end
and so we used to get the only element out of arrays that way.
Having an array in which you are sure there is only a single element is
something that many would call a smell.
However, I think this is off topic for Rails core now.
--
Tejas Dinkar
http
On Jul-19-2013, at 8:08 PM, Mohamed Wael Khobalatte wael.khobala...@gmail.com
wrote:
Because you won't need to run a query on one element?
I think the question is more about Model.last(5) or Model.first(5)
These return arrays when they could return a relation.
--
Tejas Dinkar
http
it significantly more difficult to have different CDN per route,
especially if some CDN is not available to some route.
--
Tejas Dinkar
http://c42.in
C42 Engineering - The team behind RubyMonk
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Core group
the
exception if you want to abort.
[1] http://c2.com/cgi/wiki?DontUseExceptionsForFlowControl
--
Tejas Dinkar
http://c42.in
C42 Engineering - The guys behind RubyMonk
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Core group.
To unsubscribe from
together (especially when using
scopes), so it makes sense to raise the exception only when I actually try to
fetch the record from the database.
--
Tejas Dinkar
http://c42.in
C42 Engineering - The guys behind RubyMonk
--
You received this message because you are subscribed to the Google Groups