# Rails wish list

**URL:** <https://www.ruby-forum.com/t/rails-wish-list/136233>\
**Category:** Rails\
**Created:** [April 30, 2008, 12:16am UTC](https://www.ruby-forum.com/t/rails-wish-list/136233 "2008-04-30T00:16:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rogerdpack](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/45deac/32.png) [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Post date:** [April 30, 2008, 12:16am UTC](https://www.ruby-forum.com/t/rails-wish-list/136233/1 "2008-04-30T00:16:19Z")

</div>

Looks like my wish list for rails currently is

\<%= radio\_button\_tag :school\_type, type, ‘’ %\>

This in my opinion should default to ‘not selected’ 🙂  
-R

---

<div class="post-metadata">

**Author:** ![rogerdpack](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/45deac/32.png) [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Post date:** [April 30, 2008, 12:21am UTC](https://www.ruby-forum.com/t/rails-wish-list/136233/2 "2008-04-30T00:21:27Z")

</div>

Perhaps this is what you’re looking for:

\<%= radio\_button\_tag :school\_type, type, false %\>

The 3rd value is for ‘checked’ - which should be false or nil to be  
not checked.

Steve

---

<div class="post-metadata">

**Author:** ![rogerdpack](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/45deac/32.png) [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Post date:** [June 10, 2008, 11:32pm UTC](https://www.ruby-forum.com/t/rails-wish-list/136233/3 "2008-06-10T23:32:13Z")

</div>

my latest wish:  
That rails’ error reports told you what the local variables were [say,  
those that had been passed to a partial]

-R

---

<div class="post-metadata">

**Author:** ![rogerdpack](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/45deac/32.png) [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Post date:** [June 11, 2008, 4:24am UTC](https://www.ruby-forum.com/t/rails-wish-list/136233/4 "2008-06-11T04:24:18Z")

</div>

> That rails’ error reports told you what the local variables were [say,  
> those that had been passed to a partial]

Rails can’t reflect true local variables, as a fundamental limitation of  
the  
language. However, if you pass :locals =\> { :@variable =\> value } as an  
instance  
variable, you might monkey-patch the Rails error formatter to reflect  
those.

---

<div class="post-metadata">

**Author:** ![rogerdpack](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/45deac/32.png) [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Post date:** [June 11, 2008, 11:37am UTC](https://www.ruby-forum.com/t/rails-wish-list/136233/5 "2008-06-11T11:37:25Z")

</div>

On 11 Jun 2008, at 03:23, Phlip wrote:

> reflect those.  
> Well I’m not saying it’s a good idea, but you can do this:

def locals(&block)  
names = eval(“local\_variables”, block.binding) -  
[ActionView::Base.erb\_variable]  
names.map do |name|  
value = eval(name, block.binding)  
“#{name}: #{h value.inspect}”  
end.join ‘  
’  
end

and then in your view  
\<%= locals {} %\>  
(removing ActionView::Base.erb\_variable is just a convenience, it  
rather clogs up the output otherwise)

Fred
