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.
Related
I am building an Umbraco site, and there is a need for a really simple forum (e.g. one level of topics, a simple subject/body form for new entries and replies, that's about it)
What is the easiest way to implement this? I think nForum is an overkill. Should I go with Umbraco API for member management and content creation, of should I use my own prefixed db tables and custom backend implementation?
Thanks in advance
Themos
For small and limited requirements you can surely look at the UFORUM, it is time tested and pretty decent.
It supports membership out of the box...
http://our.umbraco.org/projects/collaboration/uforum-basics
Check it out Hope it helps.
So I'm creating a simple application. I have a 'Games' database table and a 'Rules' database table. Each game can have many rules. I want to present a form like this:
Game Title:
Game Description:
Rule #1:
(Click to add another rule)
So the user can click a button to add another text field for additional rules. What is the best way of going about this? Are there form helpers? Any way to return an array of rules? I'm somewhat new to Rails, and my googling didn't provide much help. I may just be being ignorant, but any help would be greatly appreciated!
What you are looking for are called "dynamic forms" and the answer to your question is in the following Railscasts episode.
http://railscasts.com/episodes/403-dynamic-forms
https://github.com/railscasts/403-dynamic-forms
Its kinda late but i hope it helps someone else.
This is old but should be identical to what you are trying to do at the core.
http://railscasts.com/episodes/75-complex-forms-part-3
Just think of Project and Tasks to your Game and Rules.
Use javascript. This would help
http://railscasts.com/episodes/197-nested-model-form-part-2
You'll likely want to use a "game" form with nested "rules" forms. This would be a lengthy answer if I put all the code needed but visiting these should help you right along:
http://railscasts.com/episodes/196-nested-model-form-part-1
http://railscasts.com/episodes/197-nested-model-form-part-2
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.
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.
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