Forum: Ruby on Rails Accessing external library

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
7f3019a0119408f7387c48c05369ae23?d=identicon&s=25 Cuong Lieu (Guest)
on 2006-02-02 23:55
(Received via mailing list)
Hi all,
I have been trying to design a Web front end for common unix sysadmin
tasks
(similar to http://www.webmin.com)
Does any one here have any recommendation as to how I can parse unix
configuration file from Rails controller?

Not trying to reinvent the wheel but just want to learn more about
Rails.

Thanks
Ce8b03e5750097942c58e12b46724312?d=identicon&s=25 Giles Bowkett (Guest)
on 2006-02-07 00:32
(Received via mailing list)
Hi Cuong, that should be pretty easy. First create a model for the
file, give that model a .parse() method, and then have the controller
call that method on the model. You want all the real code inside the
model.

The method itself should be pretty easy -- just open the file and use
regular expressions.

Giles

On 2/2/06, Cuong Lieu <ctlieu@gmail.com> wrote:
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
>
>


--
Giles Goat Boy

http://gilesmakesmusic.blogspot.com
http://gileswritescode.blogspot.com
This topic is locked and can not be replied to.