Colin Law wrote:
> To check that the view is interpreting this you could try <%= "value is
> #...@mydate}" %>. If you see the fixed text then it is just that @mydate
> is
> not getting setup for some reason. Possibly a typo that you just can't
> get
> your eye on.
>
> What do you mean by "I can even put garbage in the controller such as
> "a;lskjdfj" and it
> doesn't give me a compile error in the controller."
>
> Colin
>
> 2009/5/22 Marek N. <[email protected]>
Hello Colin,
That is a good idea for a test case and the fixed text does appear, but
not the variable's value. What kind of typo could cause this? The odd
thing is that I have a "def query" below it that is able to pass values
to "query.rhtml" without any issues...
As for your question, I have two rhtml files, index and query. If I put
meaningless junk in "def query" I get the following interpretation error
(as expected):
undefined local variable or method `laksjdf' for
#<VersionController:0xf6993310>
if I copy paste the same junk text into "def index", it does not produce
an error (odd right?). This seems to indicate that
version_controller.rb is not interpreting the code in "def index" for
some reason, but is interpreting it in the "def query" which is directly
below it. This is at least consistent with why it is not showing the
value for @mydate. I don't know enough about ruby to figure out what
could cause this sort of behaviour.
Thanks,
Mark
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---