Displaying 20 results from an estimated 20000 matches similar to: "TIME - STR_TO_DATE"
2010 Feb 15
5
help on how append html tag
Dear all,
@doc = Hpricot(open("#{RAILS_ROOT}" +
"/public/server_exe/#{list.file_path}"))
i need to add <img src = "/ScreenCapture/#{@file_name}"/> element to my
@doc hpricot instance..
Please help me... how can i add the above img src element to the @doc
hpricot instance..
Thank you
--
Posted via http://www.ruby-forum.com/.
--
You received this message
2006 Jun 08
19
Agile Web Dev (book) question: errors
This is kind of frustrating (but no doubt helpful in the long run) that
after following along and coding , and d/l the code the same error is
appearing.
For those who are familiar with the depot app, I''ve run into a problem after
fixing the cart to reflect quanitites. I worked through the intended error
messages but now have this appearing:
SyntaxError in StoreController#add_to_cart
2010 Jan 12
2
Question on Render :file => file
Dear Friends,
I use render :file method to display html file which has images in it .
The render file method not displays a HTML file with images that''s
exists inside public folder.
Both my HTML files and images refereed are in the public folder only.
Question 1: how to view that HTML file with images in it
Question 2: why render file method is not showing the images in the
HTML
2012 Aug 28
16
rail s exiting
Hello everyone,
I am fairly new to ruby on rails, and I come across this tutorial on
treehouse where they help you make a simple version of facebook.
anyway, I was writing codes, and I came across this error and I am not
sure how to fix it. The error occurs after I type in rail s on the
command prompt and as soon as try to look at how it looks on
127.0.0.1:3000, it gives me this error. the
2013 May 31
11
A simple javascript alert not working
If I have a file in view /test called index.js.erb and in it a simple
alert("hello") shouldn''t that run when I go to /test/index? It doesn''t.
--
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 unsubscribe from this group and stop receiving emails from it,
2012 Jul 17
24
Static Pages from Railcast
Hi everyone,
I need several pages to be static but also modify when requested. I try
following the railcast from Ryan at
http://railscasts.com/episodes/117-semi-static-pages?view=comments
Here what I have done!!
rails g scaffold Pages name:string permanentlink:string title:string
author:string access_level:string is_published:boolean
meta_description:string meta_keyword:string
2010 Jun 29
16
problem finding find current page
I have this bit of code in my email.controller
user = @current_user
story = @current_story
recipient = story.user
It doesn''t work because @current_story isn''t defined. How can I find the
current page to make this work?
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
2010 Aug 19
6
Depreciation warning when running a db migrate!
Hey,
Whenever i try and run a db migrate i get this error:
DEPRECATION WARNING: Rake tasks in vendor/plugins/livevalidation/tasks
and vendor/plugins/restful-authentication/tasks are deprecated. Use
lib/tasks instead. (called from
/Users/Zack/.gem/ruby/1.8/gems/rails-2.3.8/lib/tasks/rails.rb:10)
I tried moving the different plugins task rake files to lib/tasks and i
got no error but the database
2010 Dec 05
14
Remove bundler
Can you remove bundler without any problem – for rails?
--
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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
2011 Jan 02
6
Database Design
Hello,
I have a user table that stores their username, email address, and
password. (along with salt, etc)
However, now I want to have more complex information associated with
each user (address, etc). I''m no DBA expert, so in terms of
performance, which is better:
- A user table that has all the fields in it (Username, Email,
password, country, state, zipcode, etc)
- A user table that
2010 Mar 05
15
Three submits, one controller
I have a ''new'' page with a submit for creating stories. On the ''show''
page the submit allows a user to enter comments. I now want a ''edit''
page for the stories with another submit for updates. I have used the
''create'' and ''update'' methods in the stories_controller on the ''new'' and
2013 May 07
4
Rake db:migrate
Hello,
I''m trying to use command rake db:migrate, but in MySQL I continuous get
an empty set and I do know why.
#/db/seeds.rb
User.create(username: "lorenz", password: "mypass", admin: true)
When I run:
rake db:seed RAILS_ENV=development --trace
I received:
** Invoke db:seed (first_time)
** Execute db:seed
** Invoke db:abort_if_pending_migrations (first_time)
**
2012 Apr 09
8
Rails Functional Testing Problem
I''m trying to run some functional tests on Rails. However I am coming up
with the following error.
RuntimeError: Called id for nil, which would mistakenly be 4 -- if you
really wanted the id of nil, use object_id
app/controllers/posts_controller.rb:11:in `create''
posts_controller_test.rb:5:in `test_should_create''
Here is my test file
require
2010 Sep 08
4
On init webrick get older rails version (suddenly)
Hi!
I''m running rails 2.3.8, confirmed by the prompt (rails -v)
I''m doing a project and on other occasions I have needed
install nested forms.
I followed the steps
(http://weblog.rubyonrails.org/2009/1/26/nested-model-forms)
This steps:
$ git clone git://github.com/alloy/rails.git
$ cd rails
$ git checkout origin/normalized_nested_attributes
$ cd ../..
$ ruby
2012 Apr 10
6
User Association
Please Im trying to create an application where i can post like twitter,
but i was the users name to be posted under their respective posts
My Post_controller looks like this
def index
@posts = Post.all(:order => "created_at DESC")
@users = User.find(:all)
#@user_id = current_user.find(params[:id])
respond_to do |format|
format.html
end
end
def create
2011 May 22
11
Problems Connecting to SQL Server
Hi all
I want to connect my app to MSSQL but when i type
rake db:migrate
an erro occured like this:
←[31mCould not find gem ''odbc (>= 0, runtime)'' in any of the gem sources
listed in your Gemfile.←[0m
this is my YML file:
development:
adapter: sqlserver
mode: odbc
dsn: ontrack
host: BABAK-PC
pool: 5
timeout: 5000
and in my gem file
gem
2010 Dec 23
36
Weird issue with converting floats to integer
Any idea why this calculates the integer the way it does?
irb> ("291.15".to_f * 100.0).to_i
=> 29114
Thanks,
Tom
--
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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
2012 Jul 19
6
Rendering Partial
I am a bit confused when coming from layout and partials.
To start of I have a file called application.html.erb which has my
layout such has follow
<html>
<head>
<body>
<%= render ''layouts/footer'' %>
</body
</html>
This call a new file _footer.html.erb
This file his has follow
<footer class="footer">
<nav>
<%=
2010 Dec 14
9
UTF-8 String.strip bug (and several over methods)
Hello, with Rails 3.0.3
"Café Noir ".strip => "Café noir"
but
"Café ".strip => "Caf\303\251"
In fact, strip() doesn''t works if the last printable character is
accentuated.
Surprisingly " écologie".strip works fine.
I''ve tried to dig deeper in active_support multibyte source code but
didn''t found any solution.
2012 Mar 05
8
Create a select with HABM
Hello, I have two tables with association HABM, projects and users, and
in projects I want to show all users that was associated to the project.
I have try with this:
<%= select( "user", "id", Project.all.collect { |p| [ p.name, p.id ] } )
%>
But only show all my projects, but Iz don''t know who show only the user
in a determinated project.
class Project <