Rails development - ruby-on-rails

I've basicall got a rails app that serves XML happily but I now need to add a HTML admin area. Whats the quickest way that I can do this?
My database and models are all happy and all I need now is run some magic script to turn it all into a website - is there anything that will do this?
If not - why not!?
Thanks in advance
Chris

If you used scaffolding, just visit your routes without the .xml postfix. What is generated tends to be rather basic, with the intent of providing boilerplate that you come in and customize later. If you want something a bit more full featured, check out ActiveScaffold, or Hobo

Related

Does Ruby on Rails affect how a web page looks?

Most of the time, whenever I hit a website that looks "bubbly" in nature, and all prettified in those pastel-like colors, I think to myself, "This was probably done with Rails." And, lo and behold, after some digging into the site's information pages I discover this is actually true. So, I pose the question, not knowing much about Rails but enough about Django to understand how the database stuff works:
Does RoR have any display-specific qualities that affect how a web page looks? Or do all RoR devs naturally use the same Adobe tools to make everything look so ubiquitous?
Ruby on Rails is a server side technology, so it doesn't lend any specific quality to the user visible design. That said, it is a "trendy" technology so people who are likely to write their back-end code with RoR are likely to choose a particular "Web 2.0" style for their views.
As a Ruby on Rails developer, I can tell you that most Ruby on Rails developers are passionate about their work and we pay a lot of attention to details when building websites as much backend as front end. Its not just a trend, its a way of thinking and working.
No, it hasn't any display-specific qualities.
The theory is that RoR makes that backend stuff easier, so more time can, and apparently is, spent on the front end stuff.
Its all done with Mirrors. And CSS. :)
Rails is a very popular Web framework, it's just be coincidence that all the ones you've looked at have been rails apps.
What kind of sites have you been looking at to draw this hypothesis?
that's a funny question with a funny description :) ... bubbly!
As a madman, I develop with RoR, it's kind of rule in our area. We learn madness from the beginning, as a result of http://railsforzombies.org...
May wise men follow a wise path!
Short Answer: NO
However...
As a Rails developer I can say that due to the Agile nature of Rails and the speed in which you can develop web applications with Rails I do find myself having more time freed up on a project to spend polishing the user interface. I believe this may be a reason you often see more polished looking Rails sites.
So in my mind I believe your choice of framework can have a direct correlation to the end product that is produced!
Rails does add some stuff to the front end. Like to every html form, it will add a hidden input element authenticity_token.
You can also tell because rails URLs and form actions will never end with suffixes like .aspx or .php or .html or .jsp, and they won't usually append ?query=book&encoding=utf8 like you see on google. And they won't usually have superlong crufties like you see on amazon (eg http://www.amazon.com/Agile-Web-Development-Rails-Ruby/dp/1934356549/ref=sr_1_1?ie=UTF8&qid=1297922135&sr=8-1). Instead Rails prefers simple routing URLs. If amazon were written in rails, you might instead expect amazon.com/books/Agile-Web-Development-Rails-Ruby
So there are ways to spot a Rails app. I expect other web frameworks, especially the ones that emulate rails, would duplicate some or all of these features, so this isn't a sure-fire method, but it helps.

Blog for existing Ruby on Rails application

I have an existing rails application/website that I want to add a blog to. I would like to access it by www.existingapplication.com/blog so I was thinking it would need to be some kind of plugin or engine or something. Does something like this exist? The main thing is that it can't be a standalone rails application, it has to be an addon to an existing app.
I was looking for something similar as well and stumbled upon Rails Engine.
It is a great way to create one.
As for you, just use this:
https://github.com/jipiboily/monologue
Someone already created an app to help add a blog to your site.
Good luck!
Why not just use Tumblr or similar, and redirect (or proxy) requests to /blog to it? If you're willing to use blog.application.com, you can even just set up a cname and be done with it. Blogging is a very solved problem at this point, and it makes little sense to staple one onto your application at the code level.
If you run it on a subdomain (blog.existingapplication.com/) it is even easier to setup and will definitely be doable through Heroku.

Rails plugin to separate markup and logic, like Wicket or Effigy

I need a Rails plugin that gives you the chance to purely separate HTML and any logic in your views. Views should be classes reading the separate markup and replacing it with dynamic content where needed.
Basically Effigy from github does this.
I am looking for something like Wicket, but on the Rails base.
I can remember seeing a plugin from a Rails enterprise that does this. In my memory, it was better and seemed more mature than Effigy. But I forgot its name. It was something like "luxurious" or "delicious"; does anyone know what I am talking about? The plugin was created in a US Rails enterprise.
Any other alternatives would be much appreciated.
I feel that Effigy is almost OK, but it's hard to find tutorials or people using it properly, so I question its the maturity.
Well, if nothing comes up, I will go ahead with Effigy for now.
All right guys, I think I finally found what I was talking about.
The plugin is called "Erector"
The thing that I like about it, is that views are finally plain ruby objects and you can do everything you can usually do in ruby. I found couple of blogposts:
https://github.com/erector/erector
Why I always liked this idea you can easily see in this blogpost
I want to thank the creators for this.

Advice for Setting Up Rails Sites for Prototyping

I'm learning Ruby on Rails and have just signed up with LunarPages as my webhosting company. To start, I want to write some test applications and get them uploaded and running on my website just to understand how things work. However, I don't want anyone looking at what I'm working on as I learn. Does anyone have any advice as to how I should structure my pages and sites in such a way that I can keep them hidden until I'm ready to go live? Can I easily do something like this?
www.mysite.com <- everyone can see
www.mysite.com/testapplication1 <- no one can see for now
www.mysite.com/testapplication2 <- no one can see for now
Sorry if this sounds like a stupid question. I'm just starting out. By the way, I have heard of Heroku but I've already paid for this webhosting service so I'd like to get my money's worth, at least until my subscription is up.
Thanks!
I'm not sure if LunarPages offers the level of configurability that is required to run rails apps from sub-directories. I'd use subdomains (testapp1.mysite.com, testapp2.mysite.com) and then use appropriate access control (could be htaccess, HTTP BASIC AUTH in your app, or something more complex like authlogic)

Creating WYSIWYG form builder (รก la Wufoo) in Rails

I have to add Wufoo-like WYSIWYG form-builder functionality to a Rails webapp.
Does anyone know of good resources (gems/engines/plugins/example code) that would help?
this is not really an answer to your question, but I still can't add comments unfortunately, due to my reputation level, sorry :)
There is exact equivalent of such functionality in Drupal(php)
http://drupal.org/project/webform especially useful for contact forms, i.e. clients happy and don't bug me every time they want to adjust or even to add new inquiry form :)
Would be nice to have such gem/plugin if any? :P
Thanks.
I don't think creating such a app in rails would be a great idea.
Using AR, such an app would be creating migrations on the fly - which doesn't sound like a great thing to do.
AFAIK, wufoo uses php.

Resources