Hi,
if you're using Rails 2.1.0 or earlier, you'll need to use the following
syntax:
a) render :partial => partial_name, :collection => @collections
Note: The above requires the partial, _partial_name.html.erb.
b) render :partial => partial_name, :object => @object
Note: The above requires the partial, _partial_name.html.erb.
If you're using Rails 2.2.2 or greater, then you can use the following
syntax:
a) render :partial => @collections
Note: The above uses the partial, _collection.html.erb.
b) render :partial => @object
Note: The above used the partial, _object.html.erb.
Good luck,
-Conrad
On Sun, Sep 20, 2009 at 2:07 PM, Chris Habgood <[email protected]> wrote:
> 2.1.0
>
>
> On Sun, Sep 20, 2009 at 4:00 PM, Conrad Taylor <[email protected]> wrote:
>
>> Hi, what version of Rails is being defined within the environment.rb file?
>>
>> -Conrad
>>
>> On Sun, Sep 20, 2009 at 10:27 AM, Eric <[email protected]> wrote:
>>
>>>
>>> Is there something I'm not getting here? The short form should be
>>> either
>>>
>>> render :partial => @foo
>>>
>>> -or-
>>>
>>> render @foo
>>>
>>> I've never seen "render :partial @foo"
>>>
>>> -eric
>>>
>>>
>>> On Sep 19, 9:44 pm, Me <[email protected]> wrote:
>>> > Running rails 2.1.0 when I do this:
>>> >
>>> > <%= render :partial => 'style', :collection => @styles %>
>>> >
>>> > I get the collection fine in my index file. When I try the shortcut:
>>> >
>>> > <%= render :partial @styles %>
>>> >
>>> > I get this error:
>>> >
>>> > Couldn't find template file for active_record/named_scope/scopes/
>>> > _scope
>>> >
>>> > Any ideas??
>>>
>>>
>>
>>
>>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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 [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
-~----------~----~----~----~------~----~------~--~---