Mark Preston wrote:
>
> I got it to work by changing my method in the mystuff_controller to look
> like this:
>
> require 'Mystuff'
>
> class MystuffController < ApplicationController
>
> def index
>
>@my = Mystuff.find( :all)
>
> end
> end
>
> The only change was to ch
On Jul 13, 12:55 am, Mark Preston
wrote:
> I got it to work by changing my method in the mystuff_controller to look
> like this:
>
> require 'Mystuff'
>
> class MystuffController < ApplicationController
>
> def index
>
> �...@my = Mystuff.find( :all)
>
> end
> end
>
> The only
Mark Preston wrote:
> Frederick Cheung wrote:
>> On Jul 13, 12:38�am, Mark Preston
>> wrote:
>>> � � � �...@my = �Mystuff.find( :all)
>> This
>>
>>> Mystuff#index
>>> <%me.each do |mr|%>
>>
>> and this need to match - the instance variables are copied over for
>> you.
>>
>> Fred
>
> Fred than
Frederick Cheung wrote:
> On Jul 13, 12:38�am, Mark Preston
> wrote:
>> � � � �...@my = �Mystuff.find( :all)
> This
>
>> Mystuff#index
>> <%me.each do |mr|%>
>
> and this need to match - the instance variables are copied over for
> you.
>
> Fred
Fred thanks, I saw that and changed it, but sti
Mark Preston wrote:
> Matt Harrison wrote:
>> Mark Preston wrote:
escape nasties (if appropriate))
>>>
>>> Extracted source (around line #2):
>>>
>>> 1: Mystuff#index
>>> 2: <%mystuff.each do |mr|%>
>>> 3: =mr.m1
>>> 4: <% end %>
>>>
>>>
>>> HELP :)
>>
>> Ok, in the controller you are as
On Jul 13, 12:38 am, Mark Preston
wrote:
> �...@my = Mystuff.find( :all)
This
> Mystuff#index
> <%me.each do |mr|%>
and this need to match - the instance variables are copied over for
you.
Fred
--~--~-~--~~~---~--~~
You received this message because yo
Matt Harrison wrote:
> Mark Preston wrote:
>>> escape nasties (if appropriate))
>>
>> Extracted source (around line #2):
>>
>> 1: Mystuff#index
>> 2: <%mystuff.each do |mr|%>
>> 3: =mr.m1
>> 4: <% end %>
>>
>>
>> HELP :)
>
> Ok, in the controller you are assigning @me to your find. Try:
>
>
Mark Preston wrote:
> Frederick Cheung wrote:
>> On Jul 12, 11:47�pm, Mark Preston
>> wrote:
>>> Mystuff#index
>>> <%mystuff.each do |mr|%>
>>> mr.m1
>>> <% end %>
>>>
>> if you want to display the result of a ruby expression (eg one of your
>> attributes) then you need to use <%= ... %> (don't f
Mark Preston wrote:
> I am trying to get data out of a database to my rhtml file. The files
> look like this:
>
> Model
> ---
> mystuff.rb
>
> class Mystuff < ActiveRecord::Base
> set_table_name "mytable"
> set_primary_key "id"
> end
>
>
> Controllers
> --
>
> mystuff_cont
Frederick Cheung wrote:
> On Jul 12, 11:47�pm, Mark Preston
> wrote:
>>
>> Mystuff#index
>> <%mystuff.each do |mr|%>
>> mr.m1
>> <% end %>
>>
>
> if you want to display the result of a ruby expression (eg one of your
> attributes) then you need to use <%= ... %> (don't forget to use h to
> escap
On Jul 12, 11:47 pm, Mark Preston
wrote:
>
> Mystuff#index
> <%mystuff.each do |mr|%>
> mr.m1
> <% end %>
>
if you want to display the result of a ruby expression (eg one of your
attributes) then you need to use <%= ... %> (don't forget to use h to
escape nasties (if appropriate))
Fred
> Than
11 matches
Mail list logo