Alex Wayne wrote:
> Dustin wrote:
>> I want to make a program that will be able to take an image file and
>> crop a square at a given coordinate value (X,Y).
>>
>> I would tell it the X,Y and the size of the crop ie. 350x350. The X,Y
>> would be the center of the newly created image.
>>
>> Tha
I have the same problem. A query which was previously:
macro_step = Step.find :first, :include => [ :parameters ],
:conditions => [ "name = 'delegate_id' AND int_v = ?", macro.id ]
failed with the message
ActiveRecord::StatementInvalid: Mysql::Error: Unknown column 'name' in
'where cla
Thanks a lot !
--
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@googlegroups.com
To unsubsc
rake db:schema:dump
-
Maurício Linhares
http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/ (en)
On Fri, Mar 6, 2009 at 10:15 AM, Tom Ha
wrote:
>
> Hi there!
>
>
> Is there a way to get a complete/up-to-date "schema.rb" file, based on
> just the database? (without using any
Hi there!
Is there a way to get a complete/up-to-date "schema.rb" file, based on
just the database? (without using any migration files...)
===
Background:
1. I had stopped using migrations at some point in time and then have
modified my db "manually", using phpMyAdmin.
jep, you are 100% correct.
On Mar 6, 1:47 pm, MaD wrote:
> in that view, does
> <%= course.class %>
> <%= course.semester_id %>
> give you something like this
> Course
> 32
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the G
Sorry, I thought this forum could understand Textile...
Here we go again:
Hi,
I've used ROR in the past,
but recently started working with version 2.2.
I don't seem to be able to get started:
1/ I create a rails app: rails music_library
2/ I create a db using an SQlite gui: music_library_DB.r
Didn't tell me much I didn't know already but what it didn't tell is how
am I supposed to keep my application RESTful if I need to load various
resources in one single action?
I mean it's easy to stay RESTful in small applications like a blog with
a small amount of resource and maybe 2 or 3 ne
in that view, does
<%= course.class %>
<%= course.semester_id %>
give you something like this
Course
32
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send
Hi,
I've used ROR in the past,
but recently started working with version 2.2.
I don't seem to be able to get started:
# I create a rails app: @rails music_library@
# I create a db using an SQlite gui: @music_library_DB.rsd@
# I edit the config/database.yml file:
@development:
adapter: sqlite3
Hello guys,
How to change the google Maptype to hybrid instead of satelite/map
--~--~-~--~~~---~--~~
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@goo
Hi all,
I tried to multiplicate two form fields in a tablerow just to inform the
user and without bothering the server. I'm sure this seems to be a
simple javascript problem, but all I got running was the following
example:
<% fields_for "offer[offer_item_attributes][]", itemtablerow do |f| %>
Joe Peck wrote:
> Muchas gracias, that is close to perfect. The only problem is if I hit
> "Preview Post" multiple times, it keeps adding onto body, but I can fix
> that problem.
>
> It's times like these that I realize I need to learn more javascript.
Hi Joe
Can u please share wid me how did
Error:
You have a nil object when you didn't expect it!
The error occurred while evaluating nil.name
the view
<%= link_to course.semester.name, :controller =>
'reporting', :action => 'new', :id => course.id %>
the database:
courses
---
name
semester_id
semesters
n
Error:
You have a nil object when you didn't expect it!
The error occurred while evaluating nil.name
the view
<%= link_to course.semester.name, :controller =>
'reporting', :action => 'new', :id => course.id %>
the database:
On Mar 6, 11:35 am, Frederick Cheung
wrote:
> On Mar 6, 9:35 am, "g
well, you got a few errors here and there. for example:
path = File.join(directory, user.user_id, filename)
i guess user doesn't have a user_id but an id, so try:
path = File.join(directory, user.id, filename)
if you post your error-message, we can try to get there step by step.
but in genera
Thanks, I'll have a look.
--
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@googlegroups.com
I tried this and got an error.
My stuff was based on this website -
http://www.tutorialspoint.com/ruby-on-rails/rails-file-uploading.htm.
I wanted a photo stored in images/user-id/ whereas this only uses
images/. So if I remove the user-id directory, and do this, I still
get an empty file.
Thanks
I would suggest you have a look at
http://www.rubyrailways.com/great-ruby-on-rails-rest-resources/
2009/3/6 Heinz Strunk
>
> No opinions?
> --
> Posted via http://www.ruby-forum.com/.
>
> >
>
--~--~-~--~~~---~--~~
You received this message because you are subscri
i'm gonna try that. thanks!
--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send ema
No opinions?
--
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@googlegroups.com
To unsubscri
John Yerhot wrote:
> try this:
>
> <%= link_to "Preview Post", {:action => :preview, :id => @topic.id},
> {:onclick => "this.href +='?body='+encodeURIComponent($F
> ('id_of_the_form_element')); return true", :id => 'link', :target =>
> "_blank"} %>
Hi John,
I have a similar requirement.
I need
Matt Jones wrote:
> I agree with this - the problem you ran into was that the routes file
> didn't get reloaded correctly. This is a known issue (see
> http://rails.lighthouseapp.com/projects/8994/tickets/981-fix-for-routing-optimization-code
> ) with the 2.1 series. I would *highly* recommend tha
Jose vicente Ribera pellicer wrote:
> solved with gem install ar_mailer
Ummm, not solvd at all.
Now I can use my localhost but when I try to update my gems I see the
same error.
:(
I can work fine, but i don't like to see this kinds of errors when i try
to update my gems. Any help please?
--
> You can do record.new_record? to check if it is a new record
Thank you
thats what i want !
--~--~-~--~~~---~--~~
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 rubyon
Frederick Cheung wrote:
> On Mar 6, 7:49�am, Luca Scaljery
> wrote:
>> Hi All
>>
>> I'm trying setup a RoR project. So far I've only done some HTML stuff
>> (nothing with controller, models etc)
>>
> Looks like your index.html is referencing a javascript file that
> doesn't exist (at least not at
Hi, I have one request.. is there any way, how can I display SQL console
results in view? I mean, for example I have PostgreSQL server, and a
simple form, where user can put any SQL command, which will be executed
via ActiveRecord::Base.connection.execute(sql) and the actual response
(if possible)
install gem 'name '
=>gem install mysql or dowanload for your rails version and install
locally from rubyforge and put it in your root directory
c://gem install -l mysql
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message be
Hi
I'm trying to delete a user's profile image that was uploaded with
attachment_fu directly to storage, without going to the view of the
Photo controller.
Basically the model is set up so
user has many photos
photos belong to user
@user = User.find(params[:id])
@photo = Photo.new(para
> <%= stylesheet_link_tag 'dynamicStyling' %>
>
You're going have to trim this down a lot - people answer questions on
this list out of good will and for most people that doesn't include
reading 500+ lines of code. I will say this: global variables yuck, I
hope all those * symbols aren't actually
MaD wrote:
> # controller:
> def show_all_models
> # require all of your models so they get loaded
> Dir.glob(RAILS_ROOT + '/app/models/*.rb').each { |file| require
> file }
> # find all subclasses of ActiveRecord
> @all_models = Object.subclasses_of(ActiveRecord::Base)
> end
>
> # view:
On Mar 6, 7:49 am, Luca Scaljery
wrote:
> Hi All
>
> I'm trying setup a RoR project. So far I've only done some HTML stuff
> (nothing with controller, models etc)
>
Looks like your index.html is referencing a javascript file that
doesn't exist (at least not at the location you've asked for).
F
On Mar 6, 8:31 am, MaD wrote:
> hallo everybody,
>
> my problem is the following:
> on one of our rails-apps we implemented session-expiry, so that the
> user gets redirected to our login-page whenever his session has timed-
> out. this is working fine for normal http-requests. however, for AJA
On Mar 6, 9:35 am, "gundest...@gmail.com"
wrote:
> In my old app (rails 1.2.6) I was able to access variables via
>
> controller
> @courses = Course.find(:all)
>
> view file:
> <% for course in @courses %>
> <%= course.name %> <- this line works
> <%= course.semester.name %> <- this is now broke
I'm trying to create a dropdown list that's populated from a model but
which has the 2nd item in the model as the default selection. This is
possible.
Here's the model snippet.
PROPERTY_TYPES = [['Choose', ''],
['Residential', 'Residential'],
solved with gem install ar_mailer
--
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@googlegr
lol, that's great!
THANKS A LOT, Colin ! ! !
Have a great weekend :)
Petar
--
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 gro
2009/3/6 Pesho Petrov
>
> Colin Law wrote:
>
> > Yes. The question is, of course, has any of this helped with your
> > original
> > question? I think it has as you can now find all messages where the
> > membership.role_id is admin and membership.member_id is the member you
> > want
>
> yes, we
On Fri, Mar 6, 2009 at 10:52 AM, --- z...@m ---
wrote:
>
>> record.save? will return Boolean.
>
> i just want to know weather it is saved ? i don want to save it or try
> to save it !
You can do record.new_record? to check if it is a new record
--~--~-~--~~~---~--~--
Colin Law wrote:
> Yes. The question is, of course, has any of this helped with your
> original
> question? I think it has as you can now find all messages where the
> membership.role_id is admin and membership.member_id is the member you
> want
yes, we are back to the first question :)
you a
> i just want to know weather it is saved ?
> i don want to save it or try to save it !
well, if you dont try to save it, the answer to your question is quite
easy: no.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
> record.save? will return Boolean.
i just want to know weather it is saved ? i don want to save it or try
to save it !
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this gr
On Fri, Mar 6, 2009 at 10:35 AM, Fresh Mix
wrote:
>
> What is the easiest way to replace record in database?
>
> Better that this:
>
> @old = Order.find(5)
> @new = Order.find(90)
>
> @old.x = @new.x
> @old.y = @new.y
@old.attributes = @new.attributes
or you can even get rid of @new completely
What is the easiest way to replace record in database?
Better that this:
@old = Order.find(5)
@new = Order.find(90)
@old.x = @new.x
@old.y = @new.y
@old.z = @new.z
@old.w = @new.w
@old.p = @new.p
@old.r = @new.r
...
@old.save
So now @old = @new except @old.id and @old.created_at
--
Posted v
I have an app with the following models:
course
belongs_to :semester
semester
has_many: courses
belongs_to :education
education
has_many :semesters
In my old app (rails 1.2.6) I was able to access variables via
controller
@courses = Course.find(:all)
view file:
<% for course in @courses %>
<%
Hi, firs at all sorry if my english is not the best.
I'm working with OSX and i have a problem trying to launc localhost.
In mongrel.log i can see this message:
Agent Log is found in /Users/jose/rankia/log/newrelic_agent.3000.log
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in
`gem_origi
Is there a way to have this working while being able to use labels, and
being valid HTML? Ie, unique IDs for the inputs?
> no - you want the output to be
>
> type="checkbox" value="3" />
>
> and then params[:user][:language_id] will be an array
>
> Fred
--
Posted via http://www.ruby-forum.
In order to take advantage of connection pooling, you need an adapter that
supports multithreading. The basic MySQL adapter doesn't do that.
Check out http://github.com/methodmissing/mysqlplus_adapter/tree/master for
a pretty detailed walkthrough to set this up.
On Thu, Mar 5, 2009 at 4:09 PM, s
You could just have one new filter that calls the other two as appropriate.
2009/3/6 Frederick Cheung
>
>
>
> On Mar 5, 11:46 pm, Shuaib85 wrote:
> > basically, I made my own user access level. In one case, the admin and
> > the client can delete their posts. so I do not want to rewrite the
> >
2009/3/5 Pesho Petrov
>
> Colin Law wrote:
> > Am I right in thinking that the member/group combination for a message
> > is
> > always the same member/group that appears in a membership record? If so
> > then would it be better to have
> >
> > Membership:
> > has_many :messages
> > belongs_to :
Robert Walker wrote:
> Michael Rigart wrote:
>> I' running in production. I have noticed that development is slower then
>> production, but the production speed is still far from acceptable. The
>> diffrence between using ActiveRecord and ActiveResource is huge.
>
> Yep, web services are genera
hallo everybody,
my problem is the following:
on one of our rails-apps we implemented session-expiry, so that the
user gets redirected to our login-page whenever his session has timed-
out. this is working fine for normal http-requests. however, for AJAX-
calls that only update a certain div of t
Have a look at
http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/f08f412c04e20ed1/d9f22348d07245f5?lnk=gst&q=++Open+a+(redbox)+modal+popup+from+inside+a+controller%3F++#d9f22348d07245f5
This was a quickfix, I haven't gone to great lengths to investigate
the js code, but the ch
101 - 153 of 153 matches
Mail list logo