[Rails] Re: Moving to Widgets from Standard Rails UI

2010-04-11 Thread Smart RoR
Steffen wrote: > I think it depends on the application / website you want to build. > For me and the applications I built with it, Ext JS and Rails have > been the perfect combination. > > Not sure what you mean with losing a lot of the magic of Rails. > I'm not a fan of erb/haml, partials and rjs

[Rails] Re: not getting validation error message

2010-04-11 Thread Smart RoR
Rahul Mehta wrote: > i have one comment controller to put comment on article > i have used this form add in my website part or some other > controller > put two validation >validates_presence_of(:name,:comment) > > code of other controller > >@comment = Comment.new >@comm

[Rails] Re: Moving to Widgets from Standard Rails UI

2010-04-11 Thread Smart RoR
Anthony Crumley wrote: > Smart RoR, > > We went down the ExtJS path and it was a painful one. The widgets can > provide a nice user experience but it comes with a high price on the > development side. When you step off the golden path with Rails you lose > a > lot of the

[Rails] Re: nested one-to-one forms question

2010-04-09 Thread Smart RoR
Joel Day wrote: > whoa, I guess I better explain what I'm trying to do. > > What I want to do is be able to create a User and a Password object with > the same form. I'm going to add the question part later (once this is > done) > > I figure that since User has a single instance of a Password,

[Rails] Re: AR query question

2010-04-09 Thread Smart RoR
Elliott Golden wrote: > Thanks for the input Michael. > > I'll rethink my data structure a bit. > > EG Your could use Single table inheritance or polymorphic set up if you are concerned about table getting too large in inheritance -- Posted via http://www.ruby-forum.com/. -- You receive

[Rails] Moving to Widgets from Standard Rails UI

2010-04-09 Thread Smart RoR
Hi: I am planning to move my app from Standard Rails UI with form_for to using widgets from jQuery/ExtJS... Most of these take json format. I can easily get JSON Format from Rails model, but updates will also send JSON format. This essentially means the default Rails UI and its helper methods w

[Rails] Child to Parent Validation Errors

2010-04-09 Thread Smart RoR
Hi: Passing child virtual attribute validation error to parent... in case of nested attributes. So, I have a Parent Model say 'Parent'. Nested Attributes it accepts for Child say 'Child' Now suppose there is a validate method in 'Child' and it has something like self.errors.add_to_base("some me

[Rails] Re: Re: Switching between Rails 3 and Rails 2

2010-04-09 Thread Smart RoR
Rick Denatale wrote: > On Sun, Apr 4, 2010 at 8:30 AM, Smart RoR wrote: >> Just want to be able to switch easily on Mac. > If you are talking about switching between different projects using > different rails versions, as opposed to switching a particular project > betwe

[Rails] Re: Switching between Rails 3 and Rails 2

2010-04-04 Thread Smart RoR
The downgrade or may be just switching between both. rails _2.3.5_ and rails _3.0.0_ styles may not work if both 2.3.5 and 3.0.0 is there? Just want to be able to switch easily on Mac. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the

[Rails] Switching between Rails 3 and Rails 2

2010-04-03 Thread Smart RoR
Hi there: Any docs that show best ways (preferably on Mac) to switch between Rails 3 and Rails2...that is Upgrade and Downgrade both? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to t

[Rails] Re: Raise Exception in Non Active Record Model

2010-03-06 Thread Smart RoR
Seems Controller Exception Handling kicks in as usual. Wanted to avoid as this is part of JS AJAX request. -- Posted via http://www.ruby-forum.com/. -- 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 rub

[Rails] Re: Static HTML in XML Builder or otherwise; With Dynamic Se

2010-03-06 Thread Smart RoR
Robert Walker wrote: > Smart RoR wrote: >> Best way to display HTML file as text or xml where some parts are >> dynamic? > > I really don't understand what you're trying to do there. How is what > you are describing any different than standard ERB templates.

[Rails] Re: Raise Exception in Non Active Record Model

2010-03-06 Thread Smart RoR
Smart RoR wrote: > Hi There: > > If I raise an exception in a Non Active Record Model object on call from > Controller that extends from ApplicationController, what are the best > ways to show it on the view side as an error? > > > Thanks much. I raise exception in No

[Rails] Raise Exception in Non Active Record Model

2010-03-06 Thread Smart RoR
Hi There: If I raise an exception in a Non Active Record Model object on call from Controller that extends from ApplicationController, what are the best ways to show it on the view side as an error? Thanks much. -- Posted via http://www.ruby-forum.com/. -- You received this message because yo

[Rails] Re: Static HTML in XML Builder or otherwise; With Dynamic Sectio

2010-03-04 Thread Smart RoR
Smart RoR wrote: > Best way to display HTML file as text or xml where some parts are > dynamic? > > So we have a Static HTML file and some portions will be dynamically > changed. > > The Idea is to render as text or xml simply. > > > If we read this Template HTML

[Rails] Static HTML in XML Builder or otherwise; With Dynamic Sectio

2010-03-04 Thread Smart RoR
Best way to display HTML file as text or xml where some parts are dynamic? So we have a Static HTML file and some portions will be dynamically changed. The Idea is to render as text or xml simply. If we read this Template HTML file and Dynamically change it, where should we store this HTML file

[Rails] Re: Html/JavaScript/CSS code ouput in TextArea-- Best Ways

2010-03-03 Thread Smart RoR
Smart RoR wrote: Its probably the builder template that works best here I guess to generate HTML code here. Is there a way to define for example to use Nokigiri instead of default Builder class? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are

[Rails] Html/JavaScript/CSS code ouput in TextArea-- Best Ways

2010-03-02 Thread Smart RoR
Hello: What would be the best way to Output Code in TextArea for a UI component? The Rails App View is pure HTML and JavaScript. 1.render in text for controller action and the text is the code string. The < and > etc can be passed as is in this mode. 2.Read a HTML Template File (containing JS

[Rails] Re: Web service client code layout -- standard practice

2010-03-01 Thread Smart RoR
Smart RoR wrote: > I guess ActiveResource is restrictive if you don't have control on the > WebService API. > > Net::Http is most flexible but no parsing done for you. > > Httparty seems nice. It uses Crack gem for XML parsing, that is better > than Rexml and Hpr

[Rails] Re: Web service client code layout -- standard practice

2010-03-01 Thread Smart RoR
I guess ActiveResource is restrictive if you don't have control on the WebService API. Net::Http is most flexible but no parsing done for you. Httparty seems nice. It uses Crack gem for XML parsing, that is better than Rexml and Hpricot in terms of parsing I think. Of course, libxml is the fas

[Rails] Re: Web service client code layout -- standard practice

2010-02-28 Thread Smart RoR
Curtis Schofield wrote: > You might like > > httparty for this (instead of Net:Http) > > I think a good place - if you are only doing it it one place - is the > model > you use it > in - with a test around that model. > > If you are doing more than that and you are building a tool for this > t

[Rails] Web service client code layout -- standard practice

2010-02-28 Thread Smart RoR
Hi: Where do you all think the web service client code (for a REST service) access fit in a Rails App? Models are what Controllers call and should probably do so now also even though its Non-Active Record. However, Models use the web service REST Access code to get XML and parse it to give Active

[Rails] Re: ActiveRecord Transaction Rollback not happening/Postgres

2010-02-12 Thread Smart RoR
Frederick Cheung wrote: > On Feb 12, 4:26�pm, Rohit Sachdeva wrote: > >> � � � � � � � msg.category= h['category'] >> � � � � � � � msg.displayable=true if h['displayable'] >> � � � � � � � msg.save >> � � � � � � end >> >> Do I need to do anything special in Postgres Installation DB Set up? >> >