Displaying 20 results from an estimated 10000 matches similar to: "You can't set a constant with namespace in the initializers?"
2007 Mar 04
0
Syntax Error??
I wanted to make a ''simple blog'' refer to "Creating a weblog in 15
minutes" on rubyonrails.org
I made controller named post, and model named posts and started again
Webrick server
but , ther was a error like this ->
SyntaxError
app/controllers/posts_controller.rb:1: Invalid char `\357'' in
expression
app/controllers/posts_controller.rb:1: Invalid char
2009 Jan 29
0
How to get rid of an ActiveRecord warning "already initialized constant"
I need to get a proxy class for a specific AR validation
I reuse a piece of code (from Globalize), where it''s set as a
constant :
module Globalize
module Model
module ActiveRecord
class << self
def create_proxy_class(klass)
Object.const_set "#{klass.name}Translation", Class.new
(::ActiveRecord::Base){..}
..
end
so in my validation module,
2015 Jul 29
0
[LLVMdev] Proposal: arbitrary relocations in constant global initializers
Hi,
I’d like to make this proposal for extending the Constant hierarchy with
a mechanism for introducing custom relocations in global initializers. This
could also be seen as a first step towards adding a “bag-of-bytes with
relocations” representation for global initializers.
Problem
In order to implement control flow integrity for indirect function calls, we
would like to add a set of
2013 Jan 12
1
showing posts in blog
When I make a new post in my blog, it returns this when I try to view my
current posts:
---------------------------------------------------------------------------
ActiveModel::MassAssignmentSecurity::Error in PostsController#create
Can''t mass-assign protected attributes: text
Rails.root: C:/Users/Josh Koloff/Desktop/Programming Stuff/Rails
Stuff/blog
Application Trace | Framework
2008 Sep 19
1
Help with best approach(fairly easy question)
Hello!
Well this is maybe a fairly easy question. I am writing an app where
users that belong to a group have their own blog where they can make
posts. I have a posts_controller with all the CRUD operations and my
index action shows all the posts from all the users on a group. The
route is:
users/1/posts
The thing is that I want to show too, all the posts from any user, or
all the posts for a
2011 Jun 09
1
subdomain based namespacing makes RSpec incorrectly state that the route doesn't exist
Hello,
I''m doing namespace routing based on subdomain, rather than path, so
that http://admin.example.com/pages leads to app/controllers/admin/
pages_controller.rb. Cucumber is following this fine, but RSpec is
complaining that the requested route doesn''t exist even though "rake
routes" shows the route. When I add a standard namespace below the
"scope :admin"
2007 Mar 19
0
action_web_services error with rspec_on_rails
I now have two specs in my rails project which correspond to one
rails controller. I can run them individually and they pass, but
running them together (either with the rake task just putting both
files on the command line):
euclid% spec spec/controllers/crud_resource_controller_spec.rb spec/
controllers/crud_resource_controller_with_join_models_spec.rb
2006 Feb 14
0
Help with Eager Association
I''ve gotten eager associations to work before, but for some reason
this isn''t working out for me this time. I''ve been scratching my head
but can''t quite figure out the nuances of what works and what doesn''t
work.
I''ve got 3 models: profile, widget_configuration and widgets
profile.rb --
has_many :widget_configurations
2003 Apr 16
1
[LLVMdev] Mutability of constant initializers
It seems that the contents of Constant{Array,Struct,etc} are immutable
after construction. The only available accessor function is
getValues(), which returns a constant reference to a vector of uses.
I have the following situation. I am building global (static) array of
structs. Hence, I build a vector of ConstantStruct pointers to give to
the ConstantArray constructor, etc. However, I have
2006 Aug 07
0
deployment failures with sqlite3
Hello list,
I''m attempting to deploy my first rails app on textdrive and have run
into a problem. I currently have lighttpd running and I am able to
start my rails app. When I attempt to visit my site I get an:
Application Error (Rails)
Investigating my production.log it looks like the app isn''t finding
sqlite3, right? Do I need to pack that with the app? What about non
2009 Apr 12
0
rails 2.3 nested forms with has_many through checkboxes
I was wondering if anyone knew of a way to combine the new nested
forms in rails 2.3 with a has_many through relationship via
checkboxes. Basically I have a page model, a page_category model and
a category_items join table. Pages have many page categories through
category items. The category_items table is polymorphic so i can use
it for other models who need categories (maybe this is
2006 Mar 15
5
acts_as_threaded - help ???
Hi, has anyone successfully used the acts_as_threaded plugin with
postgresql?
I''m using rails 1.0 and ruby 1.8.4 on linux.
Following the screencast on
http://www.railtie.net/articles/2006/02/05/rails-acts_as_threaded-plugin ,
I got to where we''re ready to create our first post, having made the
changes to controllers/posts_controller.rb, views/posts/_form.rhtml,
2007 Mar 19
3
controller_name with dynamic controllers
I''m writing a controller which should only be inherited from,
something like the generic crud controller seen here: http://
geekonomics.blogspot.com/2006/07/crud-and-shared-controllers.html
Now, in my spec, I would like to create a controller which inherits
from the generic CRUDController, without actually creating the
controller. This controller is *only* for testing.
How can I
2008 May 06
2
Can you use RSpec to test initializers?
Hi there!
I''m trying to spec out some code that will set the smtp_settings in a
custom ActiveMailer object. Basically I want to check that if my
configuration object has the right smtp_server, that the ActiveMailer
object gets set up correctly. So, my spec looks like this:
it "uses smtp server if config says so" do
2015 Aug 26
2
Proposal: arbitrary relocations in constant global initializers
On Wed, Aug 26, 2015 at 11:49:46AM -0400, Rafael Espíndola wrote:
> This is pr10368.
>
> Do we really need to support hard coded relocation numbers? Looks like
> the examples above have a representation as constant expressions:
>
> (sub (add (ptrtoint @foo) 0xeafffffe) cur_pos)
>
> no?
I'm not sure if this would be sufficient. The R_ARM_JUMP24 relocation
on ARM
2006 Jan 11
1
logger in my classes
Hi,
I wrote a class which is not an AR extension, nor a controller.
I''d like to use logger.* methods there too.
My class is in lib/ dir. I include it in environment.rb with the line
require ''lib/localization''
just after the line
require File.join(File.dirname(__FILE__), ''boot'')
I tried many ways to reuse the logger class. The cleaner way seemed to
2012 May 23
1
received unexpected message :id= with (20)
Please help me to understand this error message:
1) PostsController#create when logged in should create a new post and
redirect to a successful message page
Failure/Error: post ''create'', { post: {title: ''New post'',
Mock Post(id: integer, title: string, description: text,
location: string, created_at: datetime, updated_at: datetime, status:
string,
2016 Oct 18
2
Proposal: arbitrary relocations in constant global initializers
To the right list this time.
On Tue, Oct 18, 2016 at 12:43 PM Eric Christopher <echristo at gmail.com>
wrote:
> Hi Peter,
>
> Coming back to his now.
>
>
> IFCC, the previous attempt to teach LLVM to emit jump tables, was removed
> for complicating how functions are emitted, in particular requiring a
> subtarget-specific instruction emitter available in
2010 Aug 21
4
No route matches?
Hi all,
I''m coming from the PHP world and I''m trying to learn Ruby and Rails.
I''m having a problem where I keep getting the error "No route matches /
home/view" even though I have it defined it. I''d appreciate any help
on this. I''m using rails 3.0 and the setting for the environment is
"development".
# routes.rb
2006 Sep 28
0
two isp issues
I am usong three ehternet cards eth0 , eth1 , eth2 and eth0 and eth2 is
connected to two diffrent ISP and eth1 is connected to local lan.
I am tring to route all the mail traffic to eth1 and I have followed the
lartc doc.
But it seems the solution does not work for me . is there a way I could
connect two diffrent ISP in one linux box with diffrent gateway address
and dns.
Thanks
Imthiyaz