I was thinking of doing partials as I did in the simple Rails
application I worked on today.
But, since I’m using ActiveScaffold, I didn’t find any *.html.erb in the
views folder of the Rails application that I need to make my partials!
How can I work with partials in ActiveScaffold?
Thanks.
I wrote a long answer about hour ago but i have a new phone and i
think i didnt send it .
Activescaffold is a rails app in it self it only uses your model, if
you go to the vendor/plugin folder you will see it sitting there it
has its own controllers and views , thats why your app is empty and
thats why i dont recommend it because is going to confuse you.
Active scaffold is used only in the admin section of the app.
2010/9/22, Abder-Rahman A. [email protected]:
Posted via http://www.ruby-forum.com/.
–
Enviado desde mi dispositivo móvil
Yes @radhames. I think especially as for me kind of still new RoR, I
should go with learning and using RoR as is.
Thanks.
Watch the railscast about inherited_resources at railscasts.com
2010/9/22, Abder-Rahman A. [email protected]:
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.
–
Enviado desde mi dispositivo móvil
I think the solution to that was using “references” as shown in the
example below:
SW Engineer wrote:
I was thinking of doing partials as I did in the simple Rails
application I worked on today.
But, since I’m using ActiveScaffold, I didn’t find any *.html.erb in the
views folder of the Rails application that I need to make my partials!
Right. ActiveScaffold is a plugin and has its own views folder (which
you normally shouldn’t mess with).
How can I work with partials in ActiveScaffold?
ActiveScaffold is essentially a simple database interface. Whatever
you’re doing with partials should not normally involve ActiveScaffold.
What are you trying to do here?
Thanks.
Best,
Marnen Laibow-Koser
http://www.marnen.org
[email protected]
Thanks @Marnen.
I think my issue was solved by the simple example here:
What I was trying to do with partials is that I have an “items” and
“itemdetails” tables, and “items” “has_many” “itemdetails”, and wanted
the “itemdetails” to be AT THE SAME page of the “item”, since for each
item, there are different “itemdetails”.
And, my issue was solved when I inserted a column in “itemdetails”,
namley, “item” and gave it the type “references” as follows:
item:references
I think it acts like a foreign key, and is the same as saying:
item_id:integer
in ordinary Rails, doesn’t it?
Reagarding “references”, I thought is was related to ActiveScaffold, but
from here:
I was told it is pure Rails.
Information on “references” can be found here:
Thanks.