For 1) add helper_method :method_name just after the method in your
controller to make it available to the views.
For 2) http://www.slash7.com/flashback/2005/02/mvc_the_most_ve.html#more
could help. If you''re not modifying the data stored in the database, I
wouldn''t involve the models. Seems strange to have data modification
that isn''t persisted to the db, but then I don''t know your
app! :)
Cheers,
Chris
On Apr 5, 2005 11:19 PM, Joshua Wehner
<joshua-AnsgPkSrJBbs2Lz0fTdYFQ@public.gmane.org>
wrote:> Hi -- New to ruby/rails, have a couple of organization questions:
>
> 1) Can I call a helper from the model? Any special syntax for that? (I
> tried a couple of things, none seemed to work.)
>
> 2) In general terms, the app I''m working on: Retrieves data from
the
> db, formats it, displays it to the user. The user may make some
> modifications, which are then applied to the data (but *not* sent back
> to the db) and the resulting data+modifications are displayed to the
> user. I guess I''m having trouble with the split between oo code
and
> m/v/c code: Where does the "make the modifications" code go? Part
of me
> thinks this is object modifying stuff, which sounds like model, but
> it''s dealing with user input to the Webapp, so that''s
controller... er?
>
> Thanks for your help with these questions. (I''m sure I''ll
have more.)
>
> -- joshua
>
> ---
> Geek out: www.thewehners.net/joshua/
>
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>