Forum: Ruby on Rails Converting Rails app to desktop with XUL?

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.
798c7f10aed317c27155ba7c53221df6?d=identicon&s=25 Gvstav (Guest)
on 2007-03-21 10:41
Hi,
We are thinking about choosing Rails as our weapon of choice for our
next project, which is basically a text editor on steroids, whith some
functionality that need an Internet connection.

In the first step we are going to develop it as a plain web app
(AJAX-ified, yay!), however, in the next step we would like to port some
of the functionality (such as the editor) to a desktop app (which can be
used without Internet connectivity).

I've read about XUL and I was wondering if anyone has any experience of
"converting" a Rails project to the desktop using XUL, and keeping Rails
as a backend? Or maybe there's a better tool than XUL?

Best regards and thanks for any help,
Gustav
Eaef4535f7a0e36ae4c8db2b940431b8?d=identicon&s=25 Jim Alateras (Guest)
on 2007-03-21 11:20
(Received via mailing list)
I was wondering whether someone could show me how to dynamically set the
  the 'id' attribute in the 'body' tag. I would like to set the id to
controller name (in lowercase) using embedded ruby.

   <body id="xxxx">
   </body>


cheers
</jima>
Ea372b8e471d747d135648cb60b306ff?d=identicon&s=25 Ernad Husremović (Guest)
on 2007-03-21 11:43
(Received via mailing list)
There is project cookbooxul as proof of concept XUL <-> rails by Zed
Shaw.

http://www.zedshaw.com/projects/cookbooxul/index.html
Just to warn, download links are not good.

I know that I have tried this online and seems to me as a really
interesting concept.

Regards, Ernad




--
Posted via forums.bring.out.ba.
Ec5a599777854c540fd102ef4691fe10?d=identicon&s=25 Rimantas Liubertas (Guest)
on 2007-03-21 11:44
(Received via mailing list)
> I was wondering whether someone could show me how to dynamically set the
>   the 'id' attribute in the 'body' tag. I would like to set the id to
> controller name (in lowercase) using embedded ruby.
>
>    <body id="xxxx">
>    </body>

<body id="<%= controller.controller_name -%>">

Regards,
Rimantas
--
http://rimantas.com/
Ea372b8e471d747d135648cb60b306ff?d=identicon&s=25 Ernad Husremović (Guest)
on 2007-03-21 12:01
(Received via mailing list)
Googling directed me to the Joseph's blog:
 * http://www.josephguhlin.com/blog/archives/category/xul/

Ernad

--
Posted via forums.bring.out.ba.
Eaef4535f7a0e36ae4c8db2b940431b8?d=identicon&s=25 Jim Alateras (Guest)
on 2007-03-21 12:32
(Received via mailing list)
thxs Rimantas. Just tried it and it works a treat. So basically i can
place <%= %> expression anywhere within quotes and it will get evaluated
  before generating the XHTML.

cheers
</jima>
Ec5a599777854c540fd102ef4691fe10?d=identicon&s=25 Rimantas Liubertas (Guest)
on 2007-03-21 13:31
(Received via mailing list)
> thxs Rimantas. Just tried it and it works a treat. So basically i can
> place <%= %> expression anywhere within quotes and it will get evaluated
>   before generating the XHTML.

Well, in this case it just happen that you need to have output
something between quotes.
In templates you can use ERB wherever you need.
You may want to read ERB section here
http://api.rubyonrails.com/classes/ActionView/Base.html
and also "Recognized tags"
http://stdlib.rubyonrails.org/libdoc/erb/rdoc/clas...
This should give you a general idea, how it works. Keep in mind that
second link is to
the general documentation of ERB, not rails specific.


Regards,
Rimantas
--
http://rimantas.com/
This topic is locked and can not be replied to.