Displaying 11 results from an estimated 11 matches for "tassoc".
Did you mean:
assoc
2010 Apr 05
3
syntax error, unexpected '\n', expecting tASSOC
...it''s related to a curly brace, but
it seems that all curly braces are properly in place. So I''m not sure
why I get this error:
SyntaxError in DashboardController#panels
rails/app/controllers/dashboard_controller.rb:170: syntax error,
unexpected ''\n'', expecting tASSOC
def panels
addDetailToContainer = "function() {
var detailContainer = jQuery(''#container'').prepend(
''<div id=\"details-chart\"></div>''
),
detailStart = Date.UTC(2008, 7, 1),...
2008 Oct 10
2
Add hash to serialized column
...to merge a hash with another using the .merge! function.
class User < ActiveRecord::Base
serialize :preferences
end
This is what I end up with in the console:
>> u = User.find(1)
>> u.preferences.merge!{:test => 1}
SyntaxError: compile error
(irb):32: syntax error, unexpected tASSOC, expecting ''}''
u.preferences.merge!{:test => 1}
^
from (irb):32
from :0
Any ideas?
Take care.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: T...
2007 May 28
2
helper with block compile error
...:id => "home-login-container"} do %>
<h1>LOGIN</h1>
<p>Already have an account?</p>
<p>LOG IN NOW</p>
<% end %>
# the error I get is a compile error
compile error
syntax error, unexpected tASSOC, expecting ''}''
_erbout.concat " "; link_block_to_remote { :url =>
{ :action => :start_login } },
^
syntax error, unexpected '','', expecting kEND
_erbout.concat "...
2008 Aug 27
1
redirect with multi-dimensional parameter hashes
...r action mantaining
the same data structure
if I try as follows:
redirect_to :controller=>"main",:action=>"inquiry",{"current"=>{
"selview"=>params[:current][:selview]}}
I receive "syntax error, unexpected ''\n'', expecting tASSOC"
the same happens if I try
redirect_to
:controller=>"main",:action=>"inquiry",:current[:selview]=>params[:current][:selview]}}
Many thanks in advance for your help
Stefano
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~...
2006 Jan 19
9
start_form_tag not taking url_for options
...#39;ve got a form that should post to user/login. The code to start the tag is:
<%= start_form_tag { :controller => "user", :action => "login" } %>
That gives me this exception:
compile error
script/../config/../app/views/user/login.rhtml:1: parse error,
unexpected tASSOC, expecting ''}''
_erbout = ''''; _erbout.concat(( start_form_tag { :controller => "user",
:action => "login" } ).to_s); _erbout.concat "\n"
^
script/../config/../app/vie...
2006 Aug 04
1
route error with controllers in a module, should just work
...ated/routing/recognition.rb:35: dynamic constant assignment
return {"controller" => ::::Admin::WelcomeController, "action" =>
"index"}
^
generated/routing/recognition.rb:35: parse error, unexpected tASSOC,
expecting tCOLON2 or ''['' or ''.''
return {"controller" => ::::Admin::WelcomeController, "action" =>
"index"}
^
generated/routing/recognition.rb:35: p...
2010 Oct 20
2
form_tag not working correctly?
So I''m trying to make
<form action=''/path'' method=''get'' class=''ajax_box''>
using:
<% form_tag :action => "search_for", {:method => :get, :class =>
''ajax_box''} do %>
but I get:
<form action=''/path?method=get&class=''ajax_box''
2006 Mar 15
13
usage of constants
I would like to define some constants that I can use across models and
views and I cannot figure out how to do that. Googling hasn''t turned up
anything useful and I''m looking at the PickAxe book, and I get the
impression that a constant must belong to a class.
If I just want a constant like...
CompanyPhoneNo = "(602) 999-9999"
and be able to use it in any view
2010 May 10
7
NilClass passed to partial view
...d I got the same result (this is normal I think since I don''t have a
billingAddress object but a Company object.
Finally, I''ve tried :
<%= :partial => "addresses/form", :object => @company.shippingAddress %>
and the error I got was :
syntax error, unexpected tASSOC, expecting '')
When I load the Company with rails console, it loads perfectly. However
I cannot manage to call the aggregated object view since the name of the
variable is not the same name as the class name... at least, that what I
think it is :-)
Can someone help me to figure this out...
2012 Nov 09
8
method conditional option pattern
When I have this pattern
sign_me(@user, :event => :authentication, :subdomain => subdomain)
how can I write it to avoid sending the :subdomain option if subdomain.nil?
( if possible ..)
sign_me(@user, :event => :authentication #?, :subdomain =>
subdomain unless subdomain.nil? )
--
You received this message because you are subscribed to the Google Groups
2008 Feb 29
7
Moving pagination to the Model
I''m using will_paginate in a Post class method;
[code]def self.list(page)
paginate :per_page => 10,
:page => page,
:include => :user
end[/code]
I can happily use the method on my posts controller index action;
[code]
class PostsController < ApplicationController
def index
@posts = Post.list(params[:page])
respond_to do |format|