On 30 November 2010 05:27, gary
<yangweining-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Is there any way to create IP address range? like 192.168.0.1/24.
> It''s too annoy to create a data each time.
> I find a Rubygems'' ipaddress.
> http://rubygems.org/gems/ipaddress.
> I would like to take this to created IP range.
>
> in new.heml.erb
>
> <%= f.lable :iprange %>
> <%= f.text.field :iprange %>
>
> I don''t how do used it in the rails'' models
>
> ip = IPAddress("192.168.0.1/24")
> ip.each do |i|
> p i.to_s
> end
Are you saying you do not know how to access the value from the text
field? It should be available in the controller in params.
Colin
Colin
--
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.