Here I'm again!

I thought it worked but I still cannot view the recipe table when a
user is signed in. Following error message raises:

 CACHE (0.0ms)   SELECT count(*) AS count_all FROM "categories" INNER
JOIN "category_assignments" ON "categories".id =
"category_assignments".category_id WHERE
(("category_assignments".recipe_id = 1))
  CACHE (0.0ms)   SELECT * FROM "countries" WHERE ("countries"."id" =
1)

ActionView::TemplateError (undefined method `signed_up?' for
nil:NilClass) on line #6 of app/views/recipes/index.dryml:
3:              <div>
4:                      <table-plus fields="this, categories.count, categories,
country">
5:                      <controls:>
6:                              <transition-buttons/>
7:                      </controls:>
8:                      </table-plus>
9:              </div>

Can someone help me again?

Kay

On Jan 12, 10:19 pm, kay <[email protected]> wrote:
> On Jan 12, 1:03 am, Tomoaki Hayasaka <[email protected]>
> wrote:> > > named_scope :viewable, lambda {|acting_user| {:conditions =>
> > > > “#{acting_user.signed_up??1:0}=1 or lifecycle_state='published'"
> > > > }}
>
>  thks. Tomoaki,
>
> that's it. There must be spaces between ? and ? and 0 and : and 1. Now
> everything is ok.
>
> > There's a space missing between ? and 1.  ?1 is parsed as a fixnum
> > (ruby 1.8) or a string literal (ruby 1.9).
>
> > >> ?1
>
> > => "1"  # in ruby 1.9>> nil.nil? ? 2 : 3
> > => 2
> > >> nil.nil?? 2 : 3
> > => 2
> > >> nil.nil? ?2 : 3
>
> > SyntaxError: (irb):14: syntax error, unexpected ':', expecting $end
>
> > -----
> > Tomoaki Hayasaka <[email protected]>

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" 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/hobousers?hl=en.

Reply via email to